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

Public Member Functions

def __init__
 
def match
 
def exact_version
 
def __eq__
 
def __ne__
 
def __hash__
 
def __repr__
 
def __str__
 

Public Attributes

 name
 
 key
 

Static Public Attributes

 version_class = None
 
tuple dist_re = re.compile(r"^(\w[\s\w'.-]*)(\((.*)\))?")
 
tuple comp_re = re.compile(r'^(<=|>=|<|>|!=|==|~=)?\s*([^\s,]+)$')
 
tuple num_re = re.compile(r'^\d+(\.\d+)*$')
 

Private Member Functions

def _check_compatible
 

Private Attributes

 _string
 
 _parts
 

Static Private Attributes

dictionary _operators
 

Constructor & Destructor Documentation

def pip._vendor.distlib.version.Matcher.__init__ (   self,
  s 
)

Member Function Documentation

def pip._vendor.distlib.version.Matcher.__eq__ (   self,
  other 
)
def pip._vendor.distlib.version.Matcher.__hash__ (   self)
def pip._vendor.distlib.version.Matcher.__ne__ (   self,
  other 
)
def pip._vendor.distlib.version.Matcher.__repr__ (   self)
def pip._vendor.distlib.version.Matcher.__str__ (   self)
def pip._vendor.distlib.version.Matcher._check_compatible (   self,
  other 
)
private
def pip._vendor.distlib.version.Matcher.exact_version (   self)
def pip._vendor.distlib.version.Matcher.match (   self,
  version 
)
Check if the provided version matches the constraints.

:param version: The version to match against this instance.
:type version: Strring or :class:`Version` instance.

Member Data Documentation

dictionary pip._vendor.distlib.version.Matcher._operators
staticprivate
Initial value:
1 = {
2  '<': lambda v, c, p: v < c,
3  '>': lambda v, c, p: v > c,
4  '<=': lambda v, c, p: v == c or v < c,
5  '>=': lambda v, c, p: v == c or v > c,
6  '==': lambda v, c, p: v == c,
7  # by default, compatible => >=.
8  '~=': lambda v, c, p: v == c or v > c,
9  '!=': lambda v, c, p: v != c,
10  }
pip._vendor.distlib.version.Matcher._parts
private
pip._vendor.distlib.version.Matcher._string
private
tuple pip._vendor.distlib.version.Matcher.comp_re = re.compile(r'^(<=|>=|<|>|!=|==|~=)?\s*([^\s,]+)$')
static
tuple pip._vendor.distlib.version.Matcher.dist_re = re.compile(r"^(\w[\s\w'.-]*)(\((.*)\))?")
static
pip._vendor.distlib.version.Matcher.key
pip._vendor.distlib.version.Matcher.name
tuple pip._vendor.distlib.version.Matcher.num_re = re.compile(r'^\d+(\.\d+)*$')
static
pip._vendor.distlib.version.Matcher.version_class = None
static

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

Copyright 2014 Google Inc. All rights reserved.