Orbits  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
Classes | Functions | Variables
pip._vendor.distlib.util Namespace Reference

Classes

class  cached_property
 
class  FileOperator
 
class  ExportEntry
 
class  Cache
 
class  EventMixin
 
class  Sequencer
 
class  Progress
 
class  HTTPSConnection
 
class  HTTPSHandler
 
class  HTTPSOnlyHandler
 
class  HTTP
 
class  HTTPS
 
class  Transport
 
class  SafeTransport
 
class  ServerProxy
 
class  CSVBase
 
class  CSVReader
 
class  CSVWriter
 
class  Configurator
 
class  SubprocessMixin
 

Functions

def parse_requirement
 
def get_resources_dests
 
def in_venv
 
def get_executable
 
def proceed
 
def extract_by_key
 
def read_exports
 
def write_exports
 
def tempdir
 
def chdir
 
def socket_timeout
 
def convert_path
 
def resolve
 
def get_export_entry
 
def get_cache_base
 
def path_to_cache_dir
 
def ensure_slash
 
def parse_credentials
 
def get_process_umask
 
def is_string_sequence
 
def split_filename
 
def get_extras
 
def _get_external_data
 
def get_project_data
 
def get_package_data
 
def unarchive
 
def zip_dir
 
def iglob
 
def _iglob
 
def _csv_open
 

Variables

tuple logger = logging.getLogger(__name__)
 
string COMMA = r'\s*,\s*'
 
tuple COMMA_RE = re.compile(COMMA)
 
string IDENT = r'(\w|[.-])+'
 
string EXTRA_IDENT = r'(\*|:(\*|\w+):|'
 
string VERSPEC = IDENT+r'\*?'
 
string RELOP = '([<>=!~]=)|[<>]'
 
tuple BARE_CONSTRAINTS
 
string DIRECT_REF = '(from\s+(?P<diref>.*))'
 
tuple CONSTRAINTS
 
string EXTRA_LIST = EXTRA_IDENT+'('
 
string EXTRAS = r'\[\s*(?P<ex>'
 
tuple REQUIREMENT
 
tuple REQUIREMENT_RE = re.compile(REQUIREMENT)
 
string RELOP_IDENT = '(?P<op>'
 
tuple RELOP_IDENT_RE = re.compile(RELOP_IDENT)
 
tuple ENTRY_RE
 
tuple PROJECT_NAME_AND_VERSION
 
tuple PYTHON_VERSION = re.compile(r'-py(\d\.?\d?)')
 
tuple NAME_VERSION_RE
 
tuple d = m.groupdict()
 
tuple ARCHIVE_EXTENSIONS
 
tuple UNITS = ('', 'K', 'M', 'G','T','P')
 
tuple RICH_GLOB = re.compile(r'\{([^}]*)\}')
 
tuple _CHECK_RECURSIVE_GLOB = re.compile(r'[^/\\,{]\*\*|\*\*[^/\\,}]')
 
tuple _CHECK_MISMATCH_SET = re.compile(r'^[^{]*\}|\{[^}]*$')
 
list _ver_info = sys.version_info[:2]
 

Function Documentation

def pip._vendor.distlib.util._csv_open (   fn,
  mode,
  kwargs 
)
private
def pip._vendor.distlib.util._get_external_data (   url)
private
def pip._vendor.distlib.util._iglob (   path_glob)
private
def pip._vendor.distlib.util.chdir (   d)
def pip._vendor.distlib.util.convert_path (   pathname)
Return 'pathname' as a name that will work on the native filesystem.

The path is split on '/' and put back together again using the current
directory separator.  Needed because filenames in the setup script are
always supplied in Unix style, and have to be converted to the local
convention before we can actually use them in the filesystem.  Raises
ValueError on non-Unix-ish systems if 'pathname' either starts or
ends with a slash.
def pip._vendor.distlib.util.ensure_slash (   s)
def pip._vendor.distlib.util.extract_by_key (   d,
  keys 
)
def pip._vendor.distlib.util.get_cache_base (   suffix = None)
Return the default base location for distlib caches. If the directory does
not exist, it is created. Use the suffix provided for the base directory,
and default to '.distlib' if it isn't provided.

On Windows, if LOCALAPPDATA is defined in the environment, then it is
assumed to be a directory, and will be the parent directory of the result.
On POSIX, and on Windows if LOCALAPPDATA is not defined, the user's home
directory - using os.expanduser('~') - will be the parent directory of
the result.

The result is just the directory '.distlib' in the parent directory as
determined above, or with the name specified with ``suffix``.
def pip._vendor.distlib.util.get_executable ( )
def pip._vendor.distlib.util.get_export_entry (   specification)
def pip._vendor.distlib.util.get_extras (   requested,
  available 
)
def pip._vendor.distlib.util.get_package_data (   name,
  version 
)
def pip._vendor.distlib.util.get_process_umask ( )
def pip._vendor.distlib.util.get_project_data (   name)
def pip._vendor.distlib.util.get_resources_dests (   resources_root,
  rules 
)
Find destinations for resources files
def pip._vendor.distlib.util.iglob (   path_glob)
Extended globbing function that supports ** and {opt1,opt2,opt3}.
def pip._vendor.distlib.util.in_venv ( )
def pip._vendor.distlib.util.is_string_sequence (   seq)
def pip._vendor.distlib.util.parse_credentials (   netloc)
def pip._vendor.distlib.util.parse_requirement (   s)
def pip._vendor.distlib.util.path_to_cache_dir (   path)
Convert an absolute path to a directory name for use in a cache.

The algorithm used is:

#. On Windows, any ``':'`` in the drive is replaced with ``'---'``.
#. Any occurrence of ``os.sep`` is replaced with ``'--'``.
#. ``'.cache'`` is appended.
def pip._vendor.distlib.util.proceed (   prompt,
  allowed_chars,
  error_prompt = None,
  default = None 
)
def pip._vendor.distlib.util.read_exports (   stream)
def pip._vendor.distlib.util.resolve (   module_name,
  dotted_path 
)
def pip._vendor.distlib.util.socket_timeout (   seconds = 15)
def pip._vendor.distlib.util.split_filename (   filename,
  project_name = None 
)
Extract name, version, python version from a filename (no extension)

Return name, version, pyver or None
def pip._vendor.distlib.util.tempdir ( )
def pip._vendor.distlib.util.unarchive (   archive_filename,
  dest_dir,
  format = None,
  check = True 
)
def pip._vendor.distlib.util.write_exports (   exports,
  stream 
)
def pip._vendor.distlib.util.zip_dir (   directory)
zip a directory tree into a BytesIO object

Variable Documentation

tuple pip._vendor.distlib.util._CHECK_MISMATCH_SET = re.compile(r'^[^{]*\}|\{[^}]*$')
tuple pip._vendor.distlib.util._CHECK_RECURSIVE_GLOB = re.compile(r'[^/\\,{]\*\*|\*\*[^/\\,}]')
list pip._vendor.distlib.util._ver_info = sys.version_info[:2]
tuple pip._vendor.distlib.util.ARCHIVE_EXTENSIONS
Initial value:
1 = ('.tar.gz', '.tar.bz2', '.tar', '.zip',
2  '.tgz', '.tbz', '.whl')
tuple pip._vendor.distlib.util.BARE_CONSTRAINTS
Initial value:
1 = ('(' + RELOP + r')?\s*(' + VERSPEC + ')(' + COMMA + '(' +
2  RELOP + r')\s*(' + VERSPEC + '))*')
string pip._vendor.distlib.util.COMMA = r'\s*,\s*'
tuple pip._vendor.distlib.util.COMMA_RE = re.compile(COMMA)
tuple pip._vendor.distlib.util.CONSTRAINTS
Initial value:
1 = (r'\(\s*(?P<c1>' + BARE_CONSTRAINTS + '|' + DIRECT_REF +
2  r')\s*\)|(?P<c2>' + BARE_CONSTRAINTS + '\s*)')
tuple pip._vendor.distlib.util.d = m.groupdict()
string pip._vendor.distlib.util.DIRECT_REF = '(from\s+(?P<diref>.*))'
tuple pip._vendor.distlib.util.ENTRY_RE
Initial value:
1 = re.compile(r'''(?P<name>(\w|[-.])+)
2  \s*=\s*(?P<callable>(\w+)([:\.]\w+)*)
3  \s*(\[\s*(?P<flags>\w+(=\w+)?(,\s*\w+(=\w+)?)*)\s*\])?
4  ''', re.VERBOSE)
string pip._vendor.distlib.util.EXTRA_IDENT = r'(\*|:(\*|\w+):|'
string pip._vendor.distlib.util.EXTRA_LIST = EXTRA_IDENT+'('
string pip._vendor.distlib.util.EXTRAS = r'\[\s*(?P<ex>'
string pip._vendor.distlib.util.IDENT = r'(\w|[.-])+'
tuple pip._vendor.distlib.util.logger = logging.getLogger(__name__)
tuple pip._vendor.distlib.util.NAME_VERSION_RE
Initial value:
1 = re.compile(r'(?P<name>[\w .-]+)\s*'
2  r'\(\s*(?P<ver>[^\s)]+)\)
tuple pip._vendor.distlib.util.PROJECT_NAME_AND_VERSION
Initial value:
1 = re.compile('([a-z0-9_]+([.-][a-z_][a-z0-9_]*)*)-'
2  '([a-z0-9_.+-]+)', re.I)
tuple pip._vendor.distlib.util.PYTHON_VERSION = re.compile(r'-py(\d\.?\d?)')
string pip._vendor.distlib.util.RELOP = '([<>=!~]=)|[<>]'
string pip._vendor.distlib.util.RELOP_IDENT = '(?P<op>'
tuple pip._vendor.distlib.util.RELOP_IDENT_RE = re.compile(RELOP_IDENT)
tuple pip._vendor.distlib.util.REQUIREMENT
Initial value:
1 = ('(?P<dn>' + IDENT + r')\s*(' + EXTRAS + r'\s*)?(\s*' +
2  CONSTRAINTS + ')?$')
tuple pip._vendor.distlib.util.REQUIREMENT_RE = re.compile(REQUIREMENT)
tuple pip._vendor.distlib.util.RICH_GLOB = re.compile(r'\{([^}]*)\}')
tuple pip._vendor.distlib.util.UNITS = ('', 'K', 'M', 'G','T','P')
string pip._vendor.distlib.util.VERSPEC = IDENT+r'\*?'

Copyright 2014 Google Inc. All rights reserved.