mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
Minor packaging cleanup.
- Use shortcut dist.version instead of going through metadata; - Use %r throughout to display project names and paths.
This commit is contained in:
parent
7b0908a8e4
commit
bab50cb124
5 changed files with 21 additions and 21 deletions
|
|
@ -72,7 +72,7 @@ class DependencyGraph:
|
|||
self.missing[distribution].append(requirement)
|
||||
|
||||
def _repr_dist(self, dist):
|
||||
return '%r %s' % (dist.name, dist.metadata['Version'])
|
||||
return '%r %s' % (dist.name, dist.version)
|
||||
|
||||
def repr_node(self, dist, level=1):
|
||||
"""Prints only a subgraph"""
|
||||
|
|
@ -145,7 +145,7 @@ def generate_graph(dists):
|
|||
graph.add_distribution(dist)
|
||||
provides = (dist.metadata['Provides-Dist'] +
|
||||
dist.metadata['Provides'] +
|
||||
['%s (%s)' % (dist.name, dist.metadata['Version'])])
|
||||
['%s (%s)' % (dist.name, dist.version)])
|
||||
|
||||
for p in provides:
|
||||
comps = p.strip().rsplit(" ", 1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue