diff options
| author | Eike Ziller <eike.ziller@qt.io> | 2024-11-01 10:36:45 +0100 |
|---|---|---|
| committer | Eike Ziller <eike.ziller@qt.io> | 2024-11-07 13:10:53 +0000 |
| commit | c327cb08f4171b48c7b3a42d1e871fc734ac936f (patch) | |
| tree | 18ca3227846969abb23e17fa618e2ff423d75e8d /scripts/common.py | |
| parent | 98f966d5be032d68e668351d4a125d7dd5864fc2 (diff) | |
COIN: Add instructions for oldest supported Qt version
And fix installation of ICU, that was installed at the wrong location
(the toplevel Qt directory instead of lib/, which didn't matter on
systems where the right ICU version was preinstalled anyway)
Change-Id: I53dcd6126b7b46358dd9aa0622e58a8c614bff3f
Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'scripts/common.py')
| -rw-r--r-- | scripts/common.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/scripts/common.py b/scripts/common.py index 4ee0ddf7036..1cbd13213d2 100644 --- a/scripts/common.py +++ b/scripts/common.py @@ -142,22 +142,26 @@ async def download(url: str, target: Path) -> None: def download_and_extract(urls: list[str], target: Path, temp: Path) -> None: + download_and_extract_tuples([(url, target) for url in urls], temp) + + +def download_and_extract_tuples(urls_and_targets: list[tuple[str, Path]], temp: Path) -> None: temp.mkdir(parents=True, exist_ok=True) - target_files = [] + target_tuples : list[tuple[Path, Path]] = [] # TODO make this work with file URLs, which then aren't downloaded # but just extracted async def impl(): tasks : list[asyncio.Task] = [] - for url in urls: + for (url, target_path) in urls_and_targets: u = urlparse(url) filename = Path(u.path).name target_file = temp / filename - target_files.append(target_file) + target_tuples.append((target_file, target_path)) tasks.append(asyncio.create_task(download(url, target_file))) for task in tasks: await task asyncio.run(impl()) - for file in target_files: + for (file, target) in target_tuples: extract_file(file, target) |
