Orbits  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
pip.index.PackageFinder Class Reference
Inheritance diagram for pip.index.PackageFinder:
_object

Public Member Functions

def __init__
 
def add_dependency_links
 
def find_requirement
 

Public Attributes

 find_links
 
 index_urls
 
 dependency_links
 
 cache
 
 logged_links
 
 use_wheel
 
 allow_external
 
 allow_unverified
 
 allow_all_external
 
 need_warn_external
 
 need_warn_unverified
 
 allow_all_prereleases
 
 process_dependency_links
 
 session
 

Private Member Functions

def _sort_locations
 
def _link_sort_key
 
def _sort_versions
 
def _find_url_name
 
def _get_pages
 
def _sort_links
 
def _package_versions
 
def _known_extensions
 
def _link_package_versions
 
def _egg_info_matches
 
def _get_page
 

Private Attributes

 _have_warned_dependency_links
 FIXME: this shouldn't be global list this, it should only apply to requirements of the package that specifies the dependency_links value FIXME: also, we should track comes_from (i.e., use Link) More...
 

Static Private Attributes

tuple _egg_fragment_re = re.compile(r'#egg=([^&]*)')
 
tuple _egg_info_re = re.compile(r'([a-z0-9_.]+)-([a-z0-9_.-]+)', re.I)
 
tuple _py_version_re = re.compile(r'-py([123]\.?[0-9]?)$')
 

Detailed Description

This finds packages.

This is meant to match easy_install's technique for looking for
packages, by reading pages and looking for appropriate links

Constructor & Destructor Documentation

def pip.index.PackageFinder.__init__ (   self,
  find_links,
  index_urls,
  use_wheel = True,
  allow_external = [],
  allow_unverified = [],
  allow_all_external = False,
  allow_all_prereleases = False,
  process_dependency_links = False,
  session = None 
)

Member Function Documentation

def pip.index.PackageFinder._egg_info_matches (   self,
  egg_info,
  search_name,
  link 
)
private
def pip.index.PackageFinder._find_url_name (   self,
  index_url,
  url_name,
  req 
)
private
Finds the true URL name of a package, when the given name isn't quite correct.
This is usually used to implement case-insensitivity.
def pip.index.PackageFinder._get_page (   self,
  link,
  req 
)
private
def pip.index.PackageFinder._get_pages (   self,
  locations,
  req 
)
private
Yields (page, page_url) from the given locations, skipping
locations that have errors, and adding download/homepage links
def pip.index.PackageFinder._known_extensions (   self)
private
def pip.index.PackageFinder._link_package_versions (   self,
  link,
  search_name 
)
private
Return an iterable of triples (pkg_resources_version_key,
link, python_version) that can be extracted from the given
link.

Meant to be overridden by subclasses, not called by clients.
def pip.index.PackageFinder._link_sort_key (   self,
  link_tuple 
)
private
Function used to generate link sort key for link tuples.
The greater the return value, the more preferred it is.
If not finding wheels, then sorted by version only.
If finding wheels, then the sort order is by version, then:
  1. existing installs
  2. wheels ordered via Wheel.support_index_min()
  3. source archives
Note: it was considered to embed this logic into the Link
      comparison operators, but then different sdist links
      with the same version, would have to be considered equal
def pip.index.PackageFinder._package_versions (   self,
  links,
  search_name 
)
private
def pip.index.PackageFinder._sort_links (   self,
  links 
)
private
def pip.index.PackageFinder._sort_locations (   self,
  locations 
)
private
Sort locations into "files" (archives) and "urls", and return
a pair of lists (files,urls)
def pip.index.PackageFinder._sort_versions (   self,
  applicable_versions 
)
private
Bring the latest version (and wheels) to the front, but maintain the existing ordering as secondary.
See the docstring for `_link_sort_key` for details.
This function is isolated for easier unit testing.
def pip.index.PackageFinder.add_dependency_links (   self,
  links 
)
def pip.index.PackageFinder.find_requirement (   self,
  req,
  upgrade 
)

Member Data Documentation

tuple pip.index.PackageFinder._egg_fragment_re = re.compile(r'#egg=([^&]*)')
staticprivate
tuple pip.index.PackageFinder._egg_info_re = re.compile(r'([a-z0-9_.]+)-([a-z0-9_.-]+)', re.I)
staticprivate
pip.index.PackageFinder._have_warned_dependency_links
private

FIXME: this shouldn't be global list this, it should only apply to requirements of the package that specifies the dependency_links value FIXME: also, we should track comes_from (i.e., use Link)

tuple pip.index.PackageFinder._py_version_re = re.compile(r'-py([123]\.?[0-9]?)$')
staticprivate
pip.index.PackageFinder.allow_all_external
pip.index.PackageFinder.allow_all_prereleases
pip.index.PackageFinder.allow_external
pip.index.PackageFinder.allow_unverified
pip.index.PackageFinder.cache
pip.index.PackageFinder.dependency_links
pip.index.PackageFinder.find_links
pip.index.PackageFinder.index_urls
pip.index.PackageFinder.logged_links
pip.index.PackageFinder.need_warn_external
pip.index.PackageFinder.need_warn_unverified
pip.index.PackageFinder.process_dependency_links
pip.index.PackageFinder.session
pip.index.PackageFinder.use_wheel

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

Copyright 2014 Google Inc. All rights reserved.