diff --git a/constructor/utils.py b/constructor/utils.py index 730ea47e3..277c2cead 100644 --- a/constructor/utils.py +++ b/constructor/utils.py @@ -181,8 +181,22 @@ def get_final_url(info, url): for entry in mapping: src = entry['src'] dst = entry['dest'] - if url.startswith(src): - new_url = url.replace(src, dst) + # Treat http:// and https:// as equivalent + if src.startswith("http"): + srcs = tuple( + dict.fromkeys( + [ + src, + src.replace("http://", "https://"), + src.replace("https://", "http://") + ] + ) + ) + else: + srcs = (src,) + if url.startswith(srcs): + for src in srcs: + new_url = url.replace(src, dst) if url.endswith(".tar.bz2"): logger.warning("You need to make the package %s available " "at %s", url.rsplit('/', 1)[1], new_url) diff --git a/dev/environment.yml b/dev/environment.yml index 7b0e8190c..721e3419c 100644 --- a/dev/environment.yml +++ b/dev/environment.yml @@ -8,4 +8,3 @@ dependencies: - conda-standalone # >=23.11.0 - pillow >=3.1 # [osx or win] - jinja2 - - conda-libmamba-solver 24.9.* \ No newline at end of file