From a36828ebd404df49bf7d3b354cfa8f338dccd1f6 Mon Sep 17 00:00:00 2001 From: wim glenn Date: Sun, 20 Aug 2023 10:42:55 -0500 Subject: [PATCH] exclude the new .metadata urls. closes https://github.com/wimglenn/johnnydep/issues/128 --- johnnydep/__init__.py | 2 +- johnnydep/pipper.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/johnnydep/__init__.py b/johnnydep/__init__.py index c0df39d..045571e 100644 --- a/johnnydep/__init__.py +++ b/johnnydep/__init__.py @@ -1,5 +1,5 @@ """Display dependency tree of Python distribution""" -__version__ = "1.20.2" +__version__ = "1.20.3" from johnnydep.lib import * diff --git a/johnnydep/pipper.py b/johnnydep/pipper.py index e579499..17de166 100755 --- a/johnnydep/pipper.py +++ b/johnnydep/pipper.py @@ -172,6 +172,8 @@ def get(dist_name, index_url=None, env=None, extra_index_url=None, tmpdir=None, parts = line.split() link = parts[3] links.append(link) + elif line.startswith("Downloading link http"): + links.append(line.split()[2]) elif line.startswith("Downloading "): parts = line.split() last = parts[-1] @@ -199,6 +201,7 @@ def get(dist_name, index_url=None, env=None, extra_index_url=None, tmpdir=None, # prefer http scheme over file links += local_links links = list(dict.fromkeys(links)) # order-preserving dedupe + links = [link for link in links if "/" in link and not link.endswith(".metadata")] if not links: log.warning("could not find download link", out=out) raise Exception("failed to collect dist")