Skip to content

Commit

Permalink
Merge pull request #129 from wimglenn/metadata-urls
Browse files Browse the repository at this point in the history
exclude the new .metadata urls. closes https://github.com/wimglenn/jo…
  • Loading branch information
wimglenn committed Aug 20, 2023
2 parents 25146fc + a36828e commit 5770e9f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion johnnydep/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""Display dependency tree of Python distribution"""

__version__ = "1.20.2"
__version__ = "1.20.3"

from johnnydep.lib import *
3 changes: 3 additions & 0 deletions johnnydep/pipper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit 5770e9f

Please sign in to comment.