Orbits  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
Public Member Functions | Public Attributes | Private Member Functions | List of all members
pip._vendor.distlib.database.DependencyGraph Class Reference
Inheritance diagram for pip._vendor.distlib.database.DependencyGraph:
_object

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
 

Detailed Description

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.

Constructor & Destructor Documentation

def pip._vendor.distlib.database.DependencyGraph.__init__ (   self)

Member Function Documentation

def pip._vendor.distlib.database.DependencyGraph.__repr__ (   self)
Representation of the graph
def pip._vendor.distlib.database.DependencyGraph._repr_dist (   self,
  dist 
)
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.

Member Data Documentation

pip._vendor.distlib.database.DependencyGraph.adjacency_list
pip._vendor.distlib.database.DependencyGraph.missing
pip._vendor.distlib.database.DependencyGraph.reverse_list

The documentation for this class was generated from the following file:

Copyright 2014 Google Inc. All rights reserved.