Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
pip._vendor.distlib.database.DependencyGraph Class Reference
Inheritance diagram for pip._vendor.distlib.database.DependencyGraph:
Inheritance graph
[legend]
Collaboration diagram for pip._vendor.distlib.database.DependencyGraph:
Collaboration graph
[legend]

Public Member Functions

 __init__ (self)
 
 add_distribution (self, distribution)
 
 add_edge (self, x, y, label=None)
 
 add_missing (self, distribution, requirement)
 
 repr_node (self, dist, level=1)
 
 to_dot (self, f, skip_disconnected=True)
 
 topological_sort (self)
 
 __repr__ (self)
 

Public Attributes

 adjacency_list
 
 reverse_list
 
 missing
 

Protected Member Functions

 _repr_dist (self, 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.

Member Function Documentation

◆ __repr__()

pip._vendor.distlib.database.DependencyGraph.__repr__ (   self)
Representation of the graph

◆ add_distribution()

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`

◆ add_edge()

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``

◆ add_missing()

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``

◆ repr_node()

pip._vendor.distlib.database.DependencyGraph.repr_node (   self,
  dist,
  level = 1 
)
Prints only a subgraph

◆ to_dot()

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``

◆ topological_sort()

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.

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