Orbits
1
|
Classes | |
class | ResolutionError |
class | VersionConflict |
class | DistributionNotFound |
class | UnknownExtra |
class | IMetadataProvider |
class | IResourceProvider |
class | WorkingSet |
class | Environment |
class | ExtractionError |
class | ResourceManager |
class | MarkerEvaluation |
class | NullProvider |
class | EggProvider |
class | DefaultProvider |
class | EmptyProvider |
class | ZipProvider |
class | FileMetadata |
class | PathMetadata |
class | EggMetadata |
class | EntryPoint |
class | Distribution |
class | DistInfoDistribution |
class | Requirement |
Variables | |
tuple | next = lambdao:o.next() |
basestring = str | |
WRITE_SUPPORT = True | |
importlib_bootstrap = None | |
dictionary | _state_vars = {} |
_sget_none = lambda*args:None | |
list | __all__ |
dictionary | _provider_factories = {} |
list | PY_MAJOR = sys.version[:3] |
int | EGG_DIST = 3 |
int | BINARY_DIST = 2 |
int | SOURCE_DIST = 1 |
int | CHECKOUT_DIST = 0 |
int | DEVELOP_DIST = -1 |
tuple | macosVersionString = re.compile(r"macosx-(\d+)\.(\d+)-(.*)") |
tuple | darwinVersionString = re.compile(r"darwin-(\d+)\.(\d+)\.(\d+)-(.*)") |
get_platform = get_build_platform | |
run_main = run_script | |
AvailableDistributions = Environment | |
invalid_marker = MarkerEvaluation.is_invalid_marker | |
evaluate_marker = MarkerEvaluation.evaluate_marker | |
tuple | empty_provider = EmptyProvider() |
tuple | LINE_END = re.compile(r"\s*(#.*)?$") |
tuple | CONTINUE = re.compile(r"\s*\\\s*(#.*)?$") |
tuple | DISTRO = re.compile(r"\s*((\w|[-.])+)") |
tuple | VERSION = re.compile(r"\s*(<=?|>=?|==|!=)\s*((\w|[-.])+)") |
tuple | COMMA = re.compile(r"\s*,") |
tuple | OBRACKET = re.compile(r"\s*\[") |
tuple | CBRACKET = re.compile(r"\s*\]") |
tuple | MODULE = re.compile(r"\w+(\.\w+)*$") |
tuple | EGG_NAME |
tuple | component_re = re.compile(r'(\d+ | [a-z]+ | \.| -)', re.VERBOSE) |
dictionary | replace = {'pre':'c', 'preview':'c','-':'final-','rc':'c','dev':'@'} |
dictionary | _distributionImpl |
dictionary | state_machine |
tuple | _manager = ResourceManager() |
tuple | working_set = WorkingSet._build_master() |
require = working_set.require | |
iter_entry_points = working_set.iter_entry_points | |
add_activation_listener = working_set.subscribe | |
run_script = working_set.run_script | |
Package resource API -------------------- A resource is a logical file contained within a package, or a logical subdirectory thereof. The package resource API expects resource names to have their path parts separated with ``/``, *not* whatever the local path separator is. Do not use os.path operations to manipulate resource names being passed into the API. The package resource API is designed to work with normal filesystem packages, .egg files, and unpacked .egg files. It can also work in a limited way with .zip files and with custom PEP 302 loaders that support the ``get_data()`` method.
def pip._vendor.pkg_resources.__getstate__ | ( | ) |
def pip._vendor.pkg_resources.__setstate__ | ( | state | ) |
|
private |
|
private |
|
private |
Return an adapter factory for `ob` from `registry`
|
private |
Get an mro for a type or classic class
|
private |
Ensure that named package includes a subpath of path_item (if needed)
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
def pip._vendor.pkg_resources.build_zipmanifest | ( | path | ) |
This builds a similar dictionary to the zipimport directory caches. However instead of tuples, ZipInfo objects are stored. The translation of the tuple is as follows: * [0] - zipinfo.filename on stock pythons this needs "/" --> os.sep on pypy it is the same (one reason why distribute did work in some cases on pypy and win32). * [1] - zipinfo.compress_type * [2] - zipinfo.compress_size * [3] - zipinfo.file_size * [4] - len(utf-8 encoding of filename) if zipinfo & 0x800 len(ascii encoding of filename) otherwise * [5] - (zipinfo.date_time[0] - 1980) << 9 | zipinfo.date_time[1] << 5 | zipinfo.date_time[2] * [6] - (zipinfo.date_time[3] - 1980) << 11 | zipinfo.date_time[4] << 5 | (zipinfo.date_time[5] // 2) * [7] - zipinfo.CRC
def pip._vendor.pkg_resources.compatible_platforms | ( | provided, | |
required | |||
) |
Can code for the `provided` platform run on the `required` platform? Returns true if either platform is ``None``, or the platforms are equal. XXX Needs compatibility checks for Linux and other unixy OSes.
def pip._vendor.pkg_resources.declare_namespace | ( | packageName | ) |
Declare that package 'packageName' is a namespace package
def pip._vendor.pkg_resources.ensure_directory | ( | path | ) |
Ensure that the parent directory of `path` exists
def pip._vendor.pkg_resources.execfile | ( | fn, | |
globs = None , |
|||
locs = None |
|||
) |
def pip._vendor.pkg_resources.file_ns_handler | ( | importer, | |
path_item, | |||
packageName, | |||
module | |||
) |
Compute an ns-package subpath for a filesystem or zipfile importer
def pip._vendor.pkg_resources.find_distributions | ( | path_item, | |
only = False |
|||
) |
Yield distributions accessible via `path_item`
def pip._vendor.pkg_resources.find_eggs_in_zip | ( | importer, | |
path_item, | |||
only = False |
|||
) |
Find eggs in zip files; possibly multiple nested eggs.
def pip._vendor.pkg_resources.find_nothing | ( | importer, | |
path_item, | |||
only = False |
|||
) |
def pip._vendor.pkg_resources.find_on_path | ( | importer, | |
path_item, | |||
only = False |
|||
) |
Yield distributions accessible on a sys.path directory
def pip._vendor.pkg_resources.fixup_namespace_packages | ( | path_item, | |
parent = None |
|||
) |
Ensure that previously-declared namespace packages include path_item
def pip._vendor.pkg_resources.get_build_platform | ( | ) |
Return this platform's string for platform-specific distributions XXX Currently this is the same as ``distutils.util.get_platform()``, but it needs some hacks for Linux and Mac OS X.
def pip._vendor.pkg_resources.get_default_cache | ( | ) |
Determine the default cache location This returns the ``PYTHON_EGG_CACHE`` environment variable, if set. Otherwise, on Windows, it returns a "Python-Eggs" subdirectory of the "Application Data" directory. On all other systems, it's "~/.python-eggs".
def pip._vendor.pkg_resources.get_distribution | ( | dist | ) |
Return a current distribution object for a Requirement or string
def pip._vendor.pkg_resources.get_entry_info | ( | dist, | |
group, | |||
name | |||
) |
Return the EntryPoint object for `group`+`name`, or ``None``
def pip._vendor.pkg_resources.get_entry_map | ( | dist, | |
group = None |
|||
) |
Return the entry point map for `group`, or the full entry map
def pip._vendor.pkg_resources.get_provider | ( | moduleOrReq | ) |
Return an IResourceProvider for the named module or requirement
def pip._vendor.pkg_resources.get_supported_platform | ( | ) |
Return this platform's maximum compatible version. distutils.util.get_platform() normally reports the minimum version of Mac OS X that would be required to *use* extensions produced by distutils. But what we want when checking compatibility is to know the version of Mac OS X that we are *running*. To allow usage of packages that explicitly require a newer version of Mac OS X, we must also know the current version of the OS. If this condition occurs for any other platform with a version in its platform strings, this function should be extended accordingly.
def pip._vendor.pkg_resources.issue_warning | ( | args, | |
kw | |||
) |
def pip._vendor.pkg_resources.load_entry_point | ( | dist, | |
group, | |||
name | |||
) |
Return `name` entry point of `group` for `dist` or raise ImportError
def pip._vendor.pkg_resources.normalize_path | ( | filename | ) |
Normalize a file/dir name for comparison purposes
def pip._vendor.pkg_resources.null_ns_handler | ( | importer, | |
path_item, | |||
packageName, | |||
module | |||
) |
def pip._vendor.pkg_resources.parse_requirements | ( | strs | ) |
Yield ``Requirement`` objects for each specification in `strs` `strs` must be an instance of ``basestring``, or a (possibly-nested) iterable thereof.
def pip._vendor.pkg_resources.parse_version | ( | s | ) |
Convert a version string to a chronologically-sortable key This is a rough cross between distutils' StrictVersion and LooseVersion; if you give it versions that would work with StrictVersion, then it behaves the same; otherwise it acts like a slightly-smarter LooseVersion. It is *possible* to create pathological version coding schemes that will fool this parser, but they should be very rare in practice. The returned value will be a tuple of strings. Numeric portions of the version are padded to 8 digits so they will compare numerically, but without relying on how numbers compare relative to strings. Dots are dropped, but dashes are retained. Trailing zeros between alpha segments or dashes are suppressed, so that e.g. "2.4.0" is considered the same as "2.4". Alphanumeric parts are lower-cased. The algorithm assumes that strings like "-" and any alpha string that alphabetically follows "final" represents a "patch level". So, "2.4-1" is assumed to be a branch or patch of "2.4", and therefore "2.4.1" is considered newer than "2.4-1", which in turn is newer than "2.4". Strings like "a", "b", "c", "alpha", "beta", "candidate" and so on (that come before "final" alphabetically) are assumed to be pre-release versions, so that the version "2.4" is considered newer than "2.4a1". Finally, to handle miscellaneous cases, the strings "pre", "preview", and "rc" are treated as if they were "c", i.e. as though they were release candidates, and therefore are not as new as a version string that does not contain them, and "dev" is replaced with an '@' so that it sorts lower than than any other pre-release tag.
def pip._vendor.pkg_resources.register_finder | ( | importer_type, | |
distribution_finder | |||
) |
Register `distribution_finder` to find distributions in sys.path items `importer_type` is the type or class of a PEP 302 "Importer" (sys.path item handler), and `distribution_finder` is a callable that, passed a path item and the importer instance, yields ``Distribution`` instances found on that path item. See ``pkg_resources.find_on_path`` for an example.
def pip._vendor.pkg_resources.register_loader_type | ( | loader_type, | |
provider_factory | |||
) |
Register `provider_factory` to make providers for `loader_type` `loader_type` is the type or class of a PEP 302 ``module.__loader__``, and `provider_factory` is a function that, passed a *module* object, returns an ``IResourceProvider`` for that module.
def pip._vendor.pkg_resources.register_namespace_handler | ( | importer_type, | |
namespace_handler | |||
) |
Register `namespace_handler` to declare namespace packages `importer_type` is the type or class of a PEP 302 "Importer" (sys.path item handler), and `namespace_handler` is a callable like this:: def namespace_handler(importer,path_entry,moduleName,module): # return a path_entry to use for child packages Namespace handlers are only called if the importer object has already agreed that it can handle the relevant path item, and they should only return a subpath if the module __path__ does not already contain an equivalent subpath. For an example namespace handler, see ``pkg_resources.file_ns_handler``.
def pip._vendor.pkg_resources.run_script | ( | dist_spec, | |
script_name | |||
) |
Locate distribution `dist_spec` and run its `script_name` script
def pip._vendor.pkg_resources.safe_extra | ( | extra | ) |
Convert an arbitrary string to a standard 'extra' name Any runs of non-alphanumeric characters are replaced with a single '_', and the result is always lowercased.
def pip._vendor.pkg_resources.safe_name | ( | name | ) |
Convert an arbitrary string to a standard distribution name Any runs of non-alphanumeric/. characters are replaced with a single '-'.
def pip._vendor.pkg_resources.safe_version | ( | version | ) |
Convert an arbitrary string to a standard version string Spaces become dots, and all other non-alphanumeric characters become dashes, with runs of multiple dashes condensed to a single dash.
def pip._vendor.pkg_resources.split_sections | ( | s | ) |
Split a string or iterable thereof into (section,content) pairs Each ``section`` is a stripped version of the section header ("[section]") and each ``content`` is a list of stripped lines excluding blank lines and comment-only lines. If there are any such lines before the first section header, they're returned in a first ``section`` of ``None``.
def pip._vendor.pkg_resources.to_filename | ( | name | ) |
Convert a project or version name to its filename-escaped form Any '-' characters are currently replaced with '_'.
def pip._vendor.pkg_resources.yield_lines | ( | strs | ) |
Yield non-empty/non-comment lines of a ``basestring`` or sequence
list pip._vendor.pkg_resources.__all__ |
dictionary pip._vendor.pkg_resources._distributionImpl |
tuple pip._vendor.pkg_resources._manager = ResourceManager() |
dictionary pip._vendor.pkg_resources._provider_factories = {} |
pip._vendor.pkg_resources._sget_none = lambda*args:None |
dictionary pip._vendor.pkg_resources._state_vars = {} |
pip._vendor.pkg_resources.add_activation_listener = working_set.subscribe |
pip._vendor.pkg_resources.AvailableDistributions = Environment |
pip._vendor.pkg_resources.basestring = str |
int pip._vendor.pkg_resources.BINARY_DIST = 2 |
tuple pip._vendor.pkg_resources.CBRACKET = re.compile(r"\s*\]") |
int pip._vendor.pkg_resources.CHECKOUT_DIST = 0 |
tuple pip._vendor.pkg_resources.COMMA = re.compile(r"\s*,") |
tuple pip._vendor.pkg_resources.component_re = re.compile(r'(\d+ | [a-z]+ | \.| -)', re.VERBOSE) |
tuple pip._vendor.pkg_resources.CONTINUE = re.compile(r"\s*\\\s*(#.*)?$") |
tuple pip._vendor.pkg_resources.darwinVersionString = re.compile(r"darwin-(\d+)\.(\d+)\.(\d+)-(.*)") |
int pip._vendor.pkg_resources.DEVELOP_DIST = -1 |
tuple pip._vendor.pkg_resources.DISTRO = re.compile(r"\s*((\w|[-.])+)") |
int pip._vendor.pkg_resources.EGG_DIST = 3 |
tuple pip._vendor.pkg_resources.EGG_NAME |
tuple pip._vendor.pkg_resources.empty_provider = EmptyProvider() |
pip._vendor.pkg_resources.evaluate_marker = MarkerEvaluation.evaluate_marker |
pip._vendor.pkg_resources.get_platform = get_build_platform |
pip._vendor.pkg_resources.importlib_bootstrap = None |
pip._vendor.pkg_resources.invalid_marker = MarkerEvaluation.is_invalid_marker |
pip._vendor.pkg_resources.iter_entry_points = working_set.iter_entry_points |
tuple pip._vendor.pkg_resources.LINE_END = re.compile(r"\s*(#.*)?$") |
tuple pip._vendor.pkg_resources.macosVersionString = re.compile(r"macosx-(\d+)\.(\d+)-(.*)") |
tuple pip._vendor.pkg_resources.MODULE = re.compile(r"\w+(\.\w+)*$") |
tuple pip._vendor.pkg_resources.next = lambdao:o.next() |
tuple pip._vendor.pkg_resources.OBRACKET = re.compile(r"\s*\[") |
list pip._vendor.pkg_resources.PY_MAJOR = sys.version[:3] |
dictionary pip._vendor.pkg_resources.replace = {'pre':'c', 'preview':'c','-':'final-','rc':'c','dev':'@'} |
pip._vendor.pkg_resources.require = working_set.require |
pip._vendor.pkg_resources.run_main = run_script |
pip._vendor.pkg_resources.run_script = working_set.run_script |
int pip._vendor.pkg_resources.SOURCE_DIST = 1 |
dictionary pip._vendor.pkg_resources.state_machine |
tuple pip._vendor.pkg_resources.VERSION = re.compile(r"\s*(<=?|>=?|==|!=)\s*((\w|[-.])+)") |
tuple pip._vendor.pkg_resources.working_set = WorkingSet._build_master() |
pip._vendor.pkg_resources.WRITE_SUPPORT = True |
Copyright 2014 Google Inc. All rights reserved.