class PackageIndex(Environment): (source)
A distribution index that scans web pages for download URLs
Method | __init__ |
Undocumented |
Method | add |
Undocumented |
Method | add |
Add `urls` to the list that will be prescanned for searches |
Method | check |
checker is a ContentChecker |
Method | debug |
Undocumented |
Method | download |
Locate and/or download `spec` to `tmpdir`, returning a local path |
Method | fetch |
Obtain a file suitable for fulfilling `requirement` |
Method | fetch |
Obtain a distribution suitable for fulfilling `requirement` |
Method | find |
Undocumented |
Method | gen |
Undocumented |
Method | info |
Undocumented |
Method | need |
Undocumented |
Method | not |
Undocumented |
Method | obtain |
Undocumented |
Method | open |
Undocumented |
Method | prescan |
Scan urls scheduled for prescanning (e.g. --find-links) |
Method | process |
Undocumented |
Method | process |
Process the contents of a PyPI page |
Method | process |
Evaluate a URL as a possible download, and maybe retrieve it |
Method | reporthook |
Undocumented |
Method | scan |
Undocumented |
Method | scan |
Undocumented |
Method | scan |
Undocumented |
Method | scan |
Undocumented |
Method | url |
Undocumented |
Method | warn |
Undocumented |
Class Variable | dl |
Undocumented |
Instance Variable | allows |
Undocumented |
Instance Variable | fetched |
Undocumented |
Instance Variable | index |
Undocumented |
Instance Variable | opener |
Undocumented |
Instance Variable | package |
Undocumented |
Instance Variable | scanned |
Undocumented |
Instance Variable | to |
Undocumented |
Static Method | _vcs |
Undocumented |
Method | _attempt |
Undocumented |
Method | _download |
Undocumented |
Method | _download |
Undocumented |
Method | _download |
Undocumented |
Method | _download |
Undocumented |
Method | _download |
Undocumented |
Method | _download |
Undocumented |
Method | _scan |
Undocumented |
Undocumented
Locate and/or download `spec` to `tmpdir`, returning a local path `spec` may be a ``Requirement`` object, or a string containing a URL, an existing local filename, or a project/version requirement spec (i.e. the string form of a ``Requirement`` object). If it is the URL of a .py file with an unambiguous ``#egg=name-version`` tag (i.e., one that escapes ``-`` as ``_`` throughout), a trivial ``setup.py`` is automatically created alongside the downloaded file. If `spec` is a ``Requirement`` object or a string containing a project/version requirement spec, this method returns the location of a matching distribution (possibly after downloading it to `tmpdir`). If `spec` is a locally existing file or directory name, it is simply returned unchanged. If `spec` is a URL, it is downloaded to a subpath of `tmpdir`, and the local filename is returned. Various errors may be raised if a problem occurs during downloading.
Obtain a file suitable for fulfilling `requirement` DEPRECATED; use the ``fetch_distribution()`` method now instead. For backward compatibility, this routine is identical but returns the ``location`` of the downloaded distribution instead of a distribution object.
Obtain a distribution suitable for fulfilling `requirement` `requirement` must be a ``pkg_resources.Requirement`` instance. If necessary, or if the `force_scan` flag is set, the requirement is searched for in the (online) package index as well as the locally installed packages. If a distribution matching `requirement` is found, the returned distribution's ``location`` is the value you would have gotten from calling the ``download()`` method with the matching distribution's URL or filename. If no matching distribution is found, ``None`` is returned. If the `source` flag is set, only source distributions and source checkout links will be considered. Unless the `develop_ok` flag is set, development and system eggs (i.e., those using the ``.egg-info`` format) will be ignored.