|
def | __init__ (self, index_url="https://pypi.org/simple/", hosts=(' *',), ca_bundle=None, verify_ssl=True, *args, **kw) |
|
def | process_url (self, url, retrieve=False) |
|
def | process_filename (self, fn, nested=False) |
|
def | url_ok (self, url, fatal=False) |
|
def | scan_egg_links (self, search_path) |
|
def | scan_egg_link (self, path, entry) |
|
def | process_index (self, url, page) |
|
def | need_version_info (self, url) |
|
def | scan_all (self, msg=None, *args) |
|
def | find_packages (self, requirement) |
|
def | obtain (self, requirement, installer=None) |
|
def | check_hash (self, checker, filename, tfp) |
|
def | add_find_links (self, urls) |
|
def | prescan (self) |
|
def | not_found_in_index (self, requirement) |
|
def | download (self, spec, tmpdir) |
|
def | fetch_distribution (self, requirement, tmpdir, force_scan=False, source=False, develop_ok=False, local_index=None) |
|
def | fetch (self, requirement, tmpdir, force_scan=False, source=False) |
|
def | gen_setup (self, filename, fragment, tmpdir) |
|
def | reporthook (self, url, filename, blocknum, blksize, size) |
|
def | open_url (self, url, warning=None) |
|
def | scan_url (self, url) |
|
def | debug (self, msg, *args) |
|
def | info (self, msg, *args) |
|
def | warn (self, msg, *args) |
|
def | __init__ (self, search_path=None, platform=get_supported_platform(), python=PY_MAJOR) |
|
def | can_add (self, dist) |
|
def | remove (self, dist) |
|
def | scan (self, search_path=None) |
|
def | __getitem__ (self, project_name) |
|
def | add (self, dist) |
|
def | best_match (self, req, working_set, installer=None, replace_conflicting=False) |
|
def | __iter__ (self) |
|
def | __iadd__ (self, other) |
|
def | __add__ (self, other) |
|
A distribution index that scans web pages for download URLs
def download |
( |
|
self, |
|
|
|
spec, |
|
|
|
tmpdir |
|
) |
| |
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.
def fetch_distribution |
( |
|
self, |
|
|
|
requirement, |
|
|
|
tmpdir, |
|
|
|
force_scan = False , |
|
|
|
source = False , |
|
|
|
develop_ok = False , |
|
|
|
local_index = None |
|
) |
| |
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.