Orbits
1
|
Public Member Functions | |
def | __init__ |
def | add_distribution |
def | add_edge |
def | add_missing |
def | repr_node |
def | to_dot |
def | topological_sort |
def | __repr__ |
Public Attributes | |
adjacency_list | |
reverse_list | |
missing | |
Private Member Functions | |
def | _repr_dist |
Represents a dependency graph between distributions. The dependency relationships are stored in an ``adjacency_list`` that maps distributions to a list of ``(other, label)`` tuples where ``other`` is a distribution and the edge is labeled with ``label`` (i.e. the version specifier, if such was provided). Also, for more efficient traversal, for every distribution ``x``, a list of predecessors is kept in ``reverse_list[x]``. An edge from distribution ``a`` to distribution ``b`` means that ``a`` depends on ``b``. If any missing dependencies are found, they are stored in ``missing``, which is a dictionary that maps distributions to a list of requirements that were not provided by any other distributions.
def pip._vendor.distlib.database.DependencyGraph.__init__ | ( | self | ) |
def pip._vendor.distlib.database.DependencyGraph.__repr__ | ( | self | ) |
Representation of the graph
|
private |
def pip._vendor.distlib.database.DependencyGraph.add_distribution | ( | self, | |
distribution | |||
) |
Add the *distribution* to the graph. :type distribution: :class:`distutils2.database.InstalledDistribution` or :class:`distutils2.database.EggInfoDistribution`
def pip._vendor.distlib.database.DependencyGraph.add_edge | ( | self, | |
x, | |||
y, | |||
label = None |
|||
) |
Add an edge from distribution *x* to distribution *y* with the given *label*. :type x: :class:`distutils2.database.InstalledDistribution` or :class:`distutils2.database.EggInfoDistribution` :type y: :class:`distutils2.database.InstalledDistribution` or :class:`distutils2.database.EggInfoDistribution` :type label: ``str`` or ``None``
def pip._vendor.distlib.database.DependencyGraph.add_missing | ( | self, | |
distribution, | |||
requirement | |||
) |
Add a missing *requirement* for the given *distribution*. :type distribution: :class:`distutils2.database.InstalledDistribution` or :class:`distutils2.database.EggInfoDistribution` :type requirement: ``str``
def pip._vendor.distlib.database.DependencyGraph.repr_node | ( | self, | |
dist, | |||
level = 1 |
|||
) |
Prints only a subgraph
def pip._vendor.distlib.database.DependencyGraph.to_dot | ( | self, | |
f, | |||
skip_disconnected = True |
|||
) |
Writes a DOT output for the graph to the provided file *f*. If *skip_disconnected* is set to ``True``, then all distributions that are not dependent on any other distribution are skipped. :type f: has to support ``file``-like operations :type skip_disconnected: ``bool``
def pip._vendor.distlib.database.DependencyGraph.topological_sort | ( | self | ) |
Perform a topological sort of the graph. :return: A tuple, the first element of which is a topologically sorted list of distributions, and the second element of which is a list of distributions that cannot be sorted because they have circular dependencies and so form a cycle.
pip._vendor.distlib.database.DependencyGraph.adjacency_list |
pip._vendor.distlib.database.DependencyGraph.missing |
pip._vendor.distlib.database.DependencyGraph.reverse_list |
Copyright 2014 Google Inc. All rights reserved.