Orbits
1
|
Public Member Functions | |
def | __init__ |
def | clear_cache |
def | distinfo_dirname |
def | get_distributions |
def | get_distribution |
def | provides_distribution |
def | get_file_path |
def | get_exported_entries |
Public Attributes | |
path | |
Properties | |
cache_enabled = property(_get_cache_enabled, _set_cache_enabled) | |
Private Member Functions | |
def | _get_cache_enabled |
def | _set_cache_enabled |
def | _yield_distributions |
def | _generate_cache |
Private Attributes | |
_include_dist | |
_include_egg | |
_cache | |
_cache_egg | |
_cache_enabled | |
_scheme | |
Represents a set of distributions installed on a path (typically sys.path).
def pip._vendor.distlib.database.DistributionPath.__init__ | ( | self, | |
path = None , |
|||
include_egg = False |
|||
) |
Create an instance from a path, optionally including legacy (distutils/ setuptools/distribute) distributions. :param path: The path to use, as a list of directories. If not specified, sys.path is used. :param include_egg: If True, this instance will look for and return legacy distributions as well as those based on PEP 376.
|
private |
Scan the path for distributions and populate the cache with those that are found.
|
private |
|
private |
|
private |
Yield .dist-info and/or .egg(-info) distributions.
def pip._vendor.distlib.database.DistributionPath.clear_cache | ( | self | ) |
Clears the internal cache.
def pip._vendor.distlib.database.DistributionPath.distinfo_dirname | ( | cls, | |
name, | |||
version | |||
) |
The *name* and *version* parameters are converted into their filename-escaped form, i.e. any ``'-'`` characters are replaced with ``'_'`` other than the one in ``'dist-info'`` and the one separating the name from the version number. :parameter name: is converted to a standard distribution name by replacing any runs of non- alphanumeric characters with a single ``'-'``. :type name: string :parameter version: is converted to a standard version string. Spaces become dots, and all other non-alphanumeric characters (except dots) become dashes, with runs of multiple dashes condensed to a single dash. :type version: string :returns: directory name :rtype: string
def pip._vendor.distlib.database.DistributionPath.get_distribution | ( | self, | |
name | |||
) |
Looks for a named distribution on the path. This function only returns the first result found, as no more than one value is expected. If nothing is found, ``None`` is returned. :rtype: :class:`InstalledDistribution`, :class:`EggInfoDistribution` or ``None``
def pip._vendor.distlib.database.DistributionPath.get_distributions | ( | self | ) |
Provides an iterator that looks for distributions and returns :class:`InstalledDistribution` or :class:`EggInfoDistribution` instances for each one of them. :rtype: iterator of :class:`InstalledDistribution` and :class:`EggInfoDistribution` instances
def pip._vendor.distlib.database.DistributionPath.get_exported_entries | ( | self, | |
category, | |||
name = None |
|||
) |
Return all of the exported entries in a particular category. :param category: The category to search for entries. :param name: If specified, only entries with that name are returned.
def pip._vendor.distlib.database.DistributionPath.get_file_path | ( | self, | |
name, | |||
relative_path | |||
) |
Return the path to a resource file.
def pip._vendor.distlib.database.DistributionPath.provides_distribution | ( | self, | |
name, | |||
version = None |
|||
) |
Iterates over all distributions to find which distributions provide *name*. If a *version* is provided, it will be used to filter the results. This function only returns the first result found, since no more than one values are expected. If the directory is not found, returns ``None``. :parameter version: a version specifier that indicates the version required, conforming to the format in ``PEP-345`` :type name: string :type version: string
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
pip._vendor.distlib.database.DistributionPath.path |
|
static |
Copyright 2014 Google Inc. All rights reserved.