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