Skip to content

Commit

Permalink
[WIP] improve module check
Browse files Browse the repository at this point in the history
  • Loading branch information
christianrauch committed Feb 17, 2024
1 parent 3e2f191 commit b2de0c0
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,17 +162,24 @@ def qt_download_check_extract(cfg, dir_install):
"archives": read_downloadable_archives(package)
}

archives_match = []
for module_name in cfg['versions']['qt_modules']:
# TODO: better check
if not package_archives:
raise RuntimeError("no package_archives")

# archives_match = []
qt_modules = cfg['versions']['qt_modules']
module_archives = dict()
for module_name in qt_modules:
for package_name, data in package_archives.items():
for archive_name in data["archives"]:
if archive_name.startswith(module_name):
archives_match.append([package_name, data["version"], archive_name])
module_archives[module_name].append([package_name, data["version"], archive_name])

if not archives_match:
raise RuntimeError(f"no matches for Qt modules ({cfg['versions']['qt_modules']}) found")
modules_missing = qt_modules - module_archives.keys()
if modules_missing:
raise RuntimeError(f"no matches for Qt modules {modules_missing} found")

for package_name, package_version, archive_name in archives_match:
for package_name, package_version, archive_name in module_archives.values():
url_archive = base_url+'/'+package_name+'/'+package_version+archive_name

print("download", url_archive)
Expand Down

0 comments on commit b2de0c0

Please sign in to comment.