asda?‰PNG  IHDR ? f ??C1 sRGB ??é gAMA ±? üa pHYs ? ??o¨d GIDATx^íüL”÷e÷Y?a?("Bh?_ò???¢§?q5k?*:t0A-o??¥]VkJ¢M??f?±8\k2íll£1]q?ù???T PKČe[42 2 hashes.pynu[from __future__ import absolute_import import hashlib from pip.exceptions import HashMismatch, HashMissing, InstallationError from pip.utils import read_chunks from pip._vendor.six import iteritems, iterkeys, itervalues # The recommended hash algo of the moment. Change this whenever the state of # the art changes; it won't hurt backward compatibility. FAVORITE_HASH = 'sha256' # Names of hashlib algorithms allowed by the --hash option and ``pip hash`` # Currently, those are the ones at least as collision-resistant as sha256. STRONG_HASHES = ['sha256', 'sha384', 'sha512'] class Hashes(object): """A wrapper that builds multiple hashes at once and checks them against known-good values """ def __init__(self, hashes=None): """ :param hashes: A dict of algorithm names pointing to lists of allowed hex digests """ self._allowed = {} if hashes is None else hashes def check_against_chunks(self, chunks): """Check good hashes against ones built from iterable of chunks of data. Raise HashMismatch if none match. """ gots = {} for hash_name in iterkeys(self._allowed): try: gots[hash_name] = hashlib.new(hash_name) except (ValueError, TypeError): raise InstallationError('Unknown hash name: %s' % hash_name) for chunk in chunks: for hash in itervalues(gots): hash.update(chunk) for hash_name, got in iteritems(gots): if got.hexdigest() in self._allowed[hash_name]: return self._raise(gots) def _raise(self, gots): raise HashMismatch(self._allowed, gots) def check_against_file(self, file): """Check good hashes against a file-like object Raise HashMismatch if none match. """ return self.check_against_chunks(read_chunks(file)) def check_against_path(self, path): with open(path, 'rb') as file: return self.check_against_file(file) def __nonzero__(self): """Return whether I know any known-good hashes.""" return bool(self._allowed) def __bool__(self): return self.__nonzero__() class MissingHashes(Hashes): """A workalike for Hashes used when we're missing a hash for a requirement It computes the actual hash of the requirement and raises a HashMissing exception showing it to the user. """ def __init__(self): """Don't offer the ``hashes`` kwarg.""" # Pass our favorite hash in to generate a "gotten hash". With the # empty list, it will never match, so an error will always raise. super(MissingHashes, self).__init__(hashes={FAVORITE_HASH: []}) def _raise(self, gots): raise HashMissing(gots[FAVORITE_HASH].hexdigest()) PKČe[qj$deprecation.pynu[""" A module that implements tooling to enable easy warnings about deprecations. """ from __future__ import absolute_import import logging import warnings class PipDeprecationWarning(Warning): pass class Pending(object): pass class RemovedInPip10Warning(PipDeprecationWarning): pass class RemovedInPip11Warning(PipDeprecationWarning, Pending): pass class Python26DeprecationWarning(PipDeprecationWarning): pass # Warnings <-> Logging Integration _warnings_showwarning = None def _showwarning(message, category, filename, lineno, file=None, line=None): if file is not None: if _warnings_showwarning is not None: _warnings_showwarning( message, category, filename, lineno, file, line, ) else: if issubclass(category, PipDeprecationWarning): # We use a specially named logger which will handle all of the # deprecation messages for pip. logger = logging.getLogger("pip.deprecations") # This is purposely using the % formatter here instead of letting # the logging module handle the interpolation. This is because we # want it to appear as if someone typed this entire message out. log_message = "DEPRECATION: %s" % message # PipDeprecationWarnings that are Pending still have at least 2 # versions to go until they are removed so they can just be # warnings. Otherwise, they will be removed in the very next # version of pip. We want these to be more obvious so we use the # ERROR logging level. if issubclass(category, Pending): logger.warning(log_message) else: logger.error(log_message) else: _warnings_showwarning( message, category, filename, lineno, file, line, ) def install_warning_logger(): # Enable our Deprecation Warnings warnings.simplefilter("default", PipDeprecationWarning, append=True) global _warnings_showwarning if _warnings_showwarning is None: _warnings_showwarning = warnings.showwarning warnings.showwarning = _showwarning PKČe[ 撸   packaging.pynu[from __future__ import absolute_import from email.parser import FeedParser import logging import sys from pip._vendor.packaging import specifiers from pip._vendor.packaging import version from pip._vendor import pkg_resources from pip import exceptions logger = logging.getLogger(__name__) def check_requires_python(requires_python): """ Check if the python version in use match the `requires_python` specifier. Returns `True` if the version of python in use matches the requirement. Returns `False` if the version of python in use does not matches the requirement. Raises an InvalidSpecifier if `requires_python` have an invalid format. """ if requires_python is None: # The package provides no information return True requires_python_specifier = specifiers.SpecifierSet(requires_python) # We only use major.minor.micro python_version = version.parse('.'.join(map(str, sys.version_info[:3]))) return python_version in requires_python_specifier def get_metadata(dist): if (isinstance(dist, pkg_resources.DistInfoDistribution) and dist.has_metadata('METADATA')): return dist.get_metadata('METADATA') elif dist.has_metadata('PKG-INFO'): return dist.get_metadata('PKG-INFO') def check_dist_requires_python(dist): metadata = get_metadata(dist) feed_parser = FeedParser() feed_parser.feed(metadata) pkg_info_dict = feed_parser.close() requires_python = pkg_info_dict.get('Requires-Python') try: if not check_requires_python(requires_python): raise exceptions.UnsupportedPythonVersion( "%s requires Python '%s' but the running Python is %s" % ( dist.project_name, requires_python, '.'.join(map(str, sys.version_info[:3])),) ) except specifiers.InvalidSpecifier as e: logger.warning( "Package %s has an invalid Requires-Python entry %s - %s" % ( dist.project_name, requires_python, e)) return PKČe[ 7t{ { glibc.pynu[from __future__ import absolute_import import re import ctypes import platform import warnings def glibc_version_string(): "Returns glibc version string, or None if not using glibc." # ctypes.CDLL(None) internally calls dlopen(NULL), and as the dlopen # manpage says, "If filename is NULL, then the returned handle is for the # main program". This way we can let the linker do the work to figure out # which libc our process is actually using. process_namespace = ctypes.CDLL(None) try: gnu_get_libc_version = process_namespace.gnu_get_libc_version except AttributeError: # Symbol doesn't exist -> therefore, we are not linked to # glibc. return None # Call gnu_get_libc_version, which returns a string like "2.5" gnu_get_libc_version.restype = ctypes.c_char_p version_str = gnu_get_libc_version() # py2 / py3 compatibility: if not isinstance(version_str, str): version_str = version_str.decode("ascii") return version_str # Separated out from have_compatible_glibc for easier unit testing def check_glibc_version(version_str, required_major, minimum_minor): # Parse string and check against requested version. # # We use a regexp instead of str.split because we want to discard any # random junk that might come after the minor version -- this might happen # in patched/forked versions of glibc (e.g. Linaro's version of glibc # uses version strings like "2.20-2014.11"). See gh-3588. m = re.match(r"(?P[0-9]+)\.(?P[0-9]+)", version_str) if not m: warnings.warn("Expected glibc version with 2 components major.minor," " got: %s" % version_str, RuntimeWarning) return False return (int(m.group("major")) == required_major and int(m.group("minor")) >= minimum_minor) def have_compatible_glibc(required_major, minimum_minor): version_str = glibc_version_string() if version_str is None: return False return check_glibc_version(version_str, required_major, minimum_minor) # platform.libc_ver regularly returns completely nonsensical glibc # versions. E.g. on my computer, platform says: # # ~$ python2.7 -c 'import platform; print(platform.libc_ver())' # ('glibc', '2.7') # ~$ python3.5 -c 'import platform; print(platform.libc_ver())' # ('glibc', '2.9') # # But the truth is: # # ~$ ldd --version # ldd (Debian GLIBC 2.22-11) 2.22 # # This is unfortunate, because it means that the linehaul data on libc # versions that was generated by pip 8.1.2 and earlier is useless and # misleading. Solution: instead of using platform, use our code that actually # works. def libc_ver(): glibc_version = glibc_version_string() if glibc_version is None: # For non-glibc platforms, fall back on platform.libc_ver return platform.libc_ver() else: return ("glibc", glibc_version) PKČe[ M.  build.pynu[from __future__ import absolute_import import os.path import tempfile from pip.utils import rmtree class BuildDirectory(object): def __init__(self, name=None, delete=None): # If we were not given an explicit directory, and we were not given an # explicit delete option, then we'll default to deleting. if name is None and delete is None: delete = True if name is None: # We realpath here because some systems have their default tmpdir # symlinked to another directory. This tends to confuse build # scripts, so we canonicalize the path by traversing potential # symlinks here. name = os.path.realpath(tempfile.mkdtemp(prefix="pip-build-")) # If we were not given an explicit directory, and we were not given # an explicit delete option, then we'll default to deleting. if delete is None: delete = True self.name = name self.delete = delete def __repr__(self): return "<{} {!r}>".format(self.__class__.__name__, self.name) def __enter__(self): return self.name def __exit__(self, exc, value, tb): self.cleanup() def cleanup(self): if self.delete: rmtree(self.name) PKČe[␕M-M-ui.pynu[from __future__ import absolute_import from __future__ import division import itertools import sys from signal import signal, SIGINT, default_int_handler import time import contextlib import logging from pip.compat import WINDOWS from pip.utils import format_size from pip.utils.logging import get_indentation from pip._vendor import six from pip._vendor.progress.bar import Bar, IncrementalBar from pip._vendor.progress.helpers import (WritelnMixin, HIDE_CURSOR, SHOW_CURSOR) from pip._vendor.progress.spinner import Spinner try: from pip._vendor import colorama # Lots of different errors can come from this, including SystemError and # ImportError. except Exception: colorama = None logger = logging.getLogger(__name__) def _select_progress_class(preferred, fallback): encoding = getattr(preferred.file, "encoding", None) # If we don't know what encoding this file is in, then we'll just assume # that it doesn't support unicode and use the ASCII bar. if not encoding: return fallback # Collect all of the possible characters we want to use with the preferred # bar. characters = [ getattr(preferred, "empty_fill", six.text_type()), getattr(preferred, "fill", six.text_type()), ] characters += list(getattr(preferred, "phases", [])) # Try to decode the characters we're using for the bar using the encoding # of the given file, if this works then we'll assume that we can use the # fancier bar and if not we'll fall back to the plaintext bar. try: six.text_type().join(characters).encode(encoding) except UnicodeEncodeError: return fallback else: return preferred _BaseBar = _select_progress_class(IncrementalBar, Bar) class InterruptibleMixin(object): """ Helper to ensure that self.finish() gets called on keyboard interrupt. This allows downloads to be interrupted without leaving temporary state (like hidden cursors) behind. This class is similar to the progress library's existing SigIntMixin helper, but as of version 1.2, that helper has the following problems: 1. It calls sys.exit(). 2. It discards the existing SIGINT handler completely. 3. It leaves its own handler in place even after an uninterrupted finish, which will have unexpected delayed effects if the user triggers an unrelated keyboard interrupt some time after a progress-displaying download has already completed, for example. """ def __init__(self, *args, **kwargs): """ Save the original SIGINT handler for later. """ super(InterruptibleMixin, self).__init__(*args, **kwargs) self.original_handler = signal(SIGINT, self.handle_sigint) # If signal() returns None, the previous handler was not installed from # Python, and we cannot restore it. This probably should not happen, # but if it does, we must restore something sensible instead, at least. # The least bad option should be Python's default SIGINT handler, which # just raises KeyboardInterrupt. if self.original_handler is None: self.original_handler = default_int_handler def finish(self): """ Restore the original SIGINT handler after finishing. This should happen regardless of whether the progress display finishes normally, or gets interrupted. """ super(InterruptibleMixin, self).finish() signal(SIGINT, self.original_handler) def handle_sigint(self, signum, frame): """ Call self.finish() before delegating to the original SIGINT handler. This handler should only be in place while the progress display is active. """ self.finish() self.original_handler(signum, frame) class DownloadProgressMixin(object): def __init__(self, *args, **kwargs): super(DownloadProgressMixin, self).__init__(*args, **kwargs) self.message = (" " * (get_indentation() + 2)) + self.message @property def downloaded(self): return format_size(self.index) @property def download_speed(self): # Avoid zero division errors... if self.avg == 0.0: return "..." return format_size(1 / self.avg) + "/s" @property def pretty_eta(self): if self.eta: return "eta %s" % self.eta_td return "" def iter(self, it, n=1): for x in it: yield x self.next(n) self.finish() class WindowsMixin(object): def __init__(self, *args, **kwargs): # The Windows terminal does not support the hide/show cursor ANSI codes # even with colorama. So we'll ensure that hide_cursor is False on # Windows. # This call neds to go before the super() call, so that hide_cursor # is set in time. The base progress bar class writes the "hide cursor" # code to the terminal in its init, so if we don't set this soon # enough, we get a "hide" with no corresponding "show"... if WINDOWS and self.hide_cursor: self.hide_cursor = False super(WindowsMixin, self).__init__(*args, **kwargs) # Check if we are running on Windows and we have the colorama module, # if we do then wrap our file with it. if WINDOWS and colorama: self.file = colorama.AnsiToWin32(self.file) # The progress code expects to be able to call self.file.isatty() # but the colorama.AnsiToWin32() object doesn't have that, so we'll # add it. self.file.isatty = lambda: self.file.wrapped.isatty() # The progress code expects to be able to call self.file.flush() # but the colorama.AnsiToWin32() object doesn't have that, so we'll # add it. self.file.flush = lambda: self.file.wrapped.flush() class DownloadProgressBar(WindowsMixin, InterruptibleMixin, DownloadProgressMixin, _BaseBar): file = sys.stdout message = "%(percent)d%%" suffix = "%(downloaded)s %(download_speed)s %(pretty_eta)s" class DownloadProgressSpinner(WindowsMixin, InterruptibleMixin, DownloadProgressMixin, WritelnMixin, Spinner): file = sys.stdout suffix = "%(downloaded)s %(download_speed)s" def next_phase(self): if not hasattr(self, "_phaser"): self._phaser = itertools.cycle(self.phases) return next(self._phaser) def update(self): message = self.message % self phase = self.next_phase() suffix = self.suffix % self line = ''.join([ message, " " if message else "", phase, " " if suffix else "", suffix, ]) self.writeln(line) ################################################################ # Generic "something is happening" spinners # # We don't even try using progress.spinner.Spinner here because it's actually # simpler to reimplement from scratch than to coerce their code into doing # what we need. ################################################################ @contextlib.contextmanager def hidden_cursor(file): # The Windows terminal does not support the hide/show cursor ANSI codes, # even via colorama. So don't even try. if WINDOWS: yield # We don't want to clutter the output with control characters if we're # writing to a file, or if the user is running with --quiet. # See https://github.com/pypa/pip/issues/3418 elif not file.isatty() or logger.getEffectiveLevel() > logging.INFO: yield else: file.write(HIDE_CURSOR) try: yield finally: file.write(SHOW_CURSOR) class RateLimiter(object): def __init__(self, min_update_interval_seconds): self._min_update_interval_seconds = min_update_interval_seconds self._last_update = 0 def ready(self): now = time.time() delta = now - self._last_update return delta >= self._min_update_interval_seconds def reset(self): self._last_update = time.time() class InteractiveSpinner(object): def __init__(self, message, file=None, spin_chars="-\\|/", # Empirically, 8 updates/second looks nice min_update_interval_seconds=0.125): self._message = message if file is None: file = sys.stdout self._file = file self._rate_limiter = RateLimiter(min_update_interval_seconds) self._finished = False self._spin_cycle = itertools.cycle(spin_chars) self._file.write(" " * get_indentation() + self._message + " ... ") self._width = 0 def _write(self, status): assert not self._finished # Erase what we wrote before by backspacing to the beginning, writing # spaces to overwrite the old text, and then backspacing again backup = "\b" * self._width self._file.write(backup + " " * self._width + backup) # Now we have a blank slate to add our status self._file.write(status) self._width = len(status) self._file.flush() self._rate_limiter.reset() def spin(self): if self._finished: return if not self._rate_limiter.ready(): return self._write(next(self._spin_cycle)) def finish(self, final_status): if self._finished: return self._write(final_status) self._file.write("\n") self._file.flush() self._finished = True # Used for dumb terminals, non-interactive installs (no tty), etc. # We still print updates occasionally (once every 60 seconds by default) to # act as a keep-alive for systems like Travis-CI that take lack-of-output as # an indication that a task has frozen. class NonInteractiveSpinner(object): def __init__(self, message, min_update_interval_seconds=60): self._message = message self._finished = False self._rate_limiter = RateLimiter(min_update_interval_seconds) self._update("started") def _update(self, status): assert not self._finished self._rate_limiter.reset() logger.info("%s: %s", self._message, status) def spin(self): if self._finished: return if not self._rate_limiter.ready(): return self._update("still running...") def finish(self, final_status): if self._finished: return self._update("finished with status '%s'" % (final_status,)) self._finished = True @contextlib.contextmanager def open_spinner(message): # Interactive spinner goes directly to sys.stdout rather than being routed # through the logging system, but it acts like it has level INFO, # i.e. it's only displayed if we're at level INFO or better. # Non-interactive spinner goes through the logging system, so it is always # in sync with logging configuration. if sys.stdout.isatty() and logger.getEffectiveLevel() <= logging.INFO: spinner = InteractiveSpinner(message) else: spinner = NonInteractiveSpinner(message) try: with hidden_cursor(sys.stdout): yield spinner except KeyboardInterrupt: spinner.finish("canceled") raise except Exception: spinner.finish("error") raise else: spinner.finish("done") PKČe[Z? encoding.pynu[import codecs import locale import re BOMS = [ (codecs.BOM_UTF8, 'utf8'), (codecs.BOM_UTF16, 'utf16'), (codecs.BOM_UTF16_BE, 'utf16-be'), (codecs.BOM_UTF16_LE, 'utf16-le'), (codecs.BOM_UTF32, 'utf32'), (codecs.BOM_UTF32_BE, 'utf32-be'), (codecs.BOM_UTF32_LE, 'utf32-le'), ] ENCODING_RE = re.compile(b'coding[:=]\s*([-\w.]+)') def auto_decode(data): """Check a bytes string for a BOM to correctly detect the encoding Fallback to locale.getpreferredencoding(False) like open() on Python3""" for bom, encoding in BOMS: if data.startswith(bom): return data[len(bom):].decode(encoding) # Lets check the first two lines as in PEP263 for line in data.split(b'\n')[:2]: if line[0:1] == b'#' and ENCODING_RE.search(line): encoding = ENCODING_RE.search(line).groups()[0].decode('ascii') return data.decode(encoding) return data.decode(locale.getpreferredencoding(False)) PKČe[C filesystem.pynu[import os import os.path from pip.compat import get_path_uid def check_path_owner(path): # If we don't have a way to check the effective uid of this process, then # we'll just assume that we own the directory. if not hasattr(os, "geteuid"): return True previous = None while path != previous: if os.path.lexists(path): # Check if path is writable by current user. if os.geteuid() == 0: # Special handling for root user in order to handle properly # cases where users use sudo without -H flag. try: path_uid = get_path_uid(path) except OSError: return False return path_uid == 0 else: return os.access(path, os.W_OK) else: previous, path = path, os.path.dirname(path) PKČe[ee outdated.pynu[from __future__ import absolute_import import datetime import json import logging import os.path import sys from pip._vendor import lockfile from pip._vendor.packaging import version as packaging_version from pip.compat import total_seconds, WINDOWS from pip.models import PyPI from pip.locations import USER_CACHE_DIR, running_under_virtualenv from pip.utils import ensure_dir, get_installed_version from pip.utils.filesystem import check_path_owner SELFCHECK_DATE_FMT = "%Y-%m-%dT%H:%M:%SZ" logger = logging.getLogger(__name__) class VirtualenvSelfCheckState(object): def __init__(self): self.statefile_path = os.path.join(sys.prefix, "pip-selfcheck.json") # Load the existing state try: with open(self.statefile_path) as statefile: self.state = json.load(statefile) except (IOError, ValueError): self.state = {} def save(self, pypi_version, current_time): # Attempt to write out our version check file with open(self.statefile_path, "w") as statefile: json.dump( { "last_check": current_time.strftime(SELFCHECK_DATE_FMT), "pypi_version": pypi_version, }, statefile, sort_keys=True, separators=(",", ":") ) class GlobalSelfCheckState(object): def __init__(self): self.statefile_path = os.path.join(USER_CACHE_DIR, "selfcheck.json") # Load the existing state try: with open(self.statefile_path) as statefile: self.state = json.load(statefile)[sys.prefix] except (IOError, ValueError, KeyError): self.state = {} def save(self, pypi_version, current_time): # Check to make sure that we own the directory if not check_path_owner(os.path.dirname(self.statefile_path)): return # Now that we've ensured the directory is owned by this user, we'll go # ahead and make sure that all our directories are created. ensure_dir(os.path.dirname(self.statefile_path)) # Attempt to write out our version check file with lockfile.LockFile(self.statefile_path): if os.path.exists(self.statefile_path): with open(self.statefile_path) as statefile: state = json.load(statefile) else: state = {} state[sys.prefix] = { "last_check": current_time.strftime(SELFCHECK_DATE_FMT), "pypi_version": pypi_version, } with open(self.statefile_path, "w") as statefile: json.dump(state, statefile, sort_keys=True, separators=(",", ":")) def load_selfcheck_statefile(): if running_under_virtualenv(): return VirtualenvSelfCheckState() else: return GlobalSelfCheckState() def pip_installed_by_pip(): """Checks whether pip was installed by pip This is used not to display the upgrade message when pip is in fact installed by system package manager, such as dnf on Fedora. """ import pkg_resources try: dist = pkg_resources.get_distribution('pip') return (dist.has_metadata('INSTALLER') and 'pip' in dist.get_metadata_lines('INSTALLER')) except pkg_resources.DistributionNotFound: return False def pip_version_check(session): """Check for an update for pip. Limit the frequency of checks to once per week. State is stored either in the active virtualenv or in the user's USER_CACHE_DIR keyed off the prefix of the pip script path. """ installed_version = get_installed_version("pip") if installed_version is None: return pip_version = packaging_version.parse(installed_version) pypi_version = None try: state = load_selfcheck_statefile() current_time = datetime.datetime.utcnow() # Determine if we need to refresh the state if "last_check" in state.state and "pypi_version" in state.state: last_check = datetime.datetime.strptime( state.state["last_check"], SELFCHECK_DATE_FMT ) if total_seconds(current_time - last_check) < 7 * 24 * 60 * 60: pypi_version = state.state["pypi_version"] # Refresh the version if we need to or just see if we need to warn if pypi_version is None: resp = session.get( PyPI.pip_json_url, headers={"Accept": "application/json"}, ) resp.raise_for_status() pypi_version = [ v for v in sorted( list(resp.json()["releases"]), key=packaging_version.parse, ) if not packaging_version.parse(v).is_prerelease ][-1] # save that we've performed a check state.save(pypi_version, current_time) remote_version = packaging_version.parse(pypi_version) # Determine if our pypi_version is older if (pip_version < remote_version and pip_version.base_version != remote_version.base_version and pip_installed_by_pip()): # Advise "python -m pip" on Windows to avoid issues # with overwriting pip.exe. if WINDOWS: pip_cmd = "python -m pip" else: pip_cmd = "pip" logger.warning( "You are using pip version %s, however version %s is " "available.\nYou should consider upgrading via the " "'%s install --upgrade pip' command.", pip_version, pypi_version, pip_cmd ) except Exception: logger.debug( "There was an error checking the latest version of pip", exc_info=True, ) PKČe[5 ;k"k" appdirs.pynu[""" This code was taken from https://github.com/ActiveState/appdirs and modified to suit our purposes. """ from __future__ import absolute_import import os import sys from pip.compat import WINDOWS, expanduser from pip._vendor.six import PY2, text_type def user_cache_dir(appname): r""" Return full path to the user-specific cache dir for this application. "appname" is the name of application. Typical user cache directories are: macOS: ~/Library/Caches/ Unix: ~/.cache/ (XDG default) Windows: C:\Users\\AppData\Local\\Cache On Windows the only suggestion in the MSDN docs is that local settings go in the `CSIDL_LOCAL_APPDATA` directory. This is identical to the non-roaming app data dir (the default returned by `user_data_dir`). Apps typically put cache data somewhere *under* the given dir here. Some examples: ...\Mozilla\Firefox\Profiles\\Cache ...\Acme\SuperApp\Cache\1.0 OPINION: This function appends "Cache" to the `CSIDL_LOCAL_APPDATA` value. """ if WINDOWS: # Get the base path path = os.path.normpath(_get_win_folder("CSIDL_LOCAL_APPDATA")) # When using Python 2, return paths as bytes on Windows like we do on # other operating systems. See helper function docs for more details. if PY2 and isinstance(path, text_type): path = _win_path_to_bytes(path) # Add our app name and Cache directory to it path = os.path.join(path, appname, "Cache") elif sys.platform == "darwin": # Get the base path path = expanduser("~/Library/Caches") # Add our app name to it path = os.path.join(path, appname) else: # Get the base path path = os.getenv("XDG_CACHE_HOME", expanduser("~/.cache")) # Add our app name to it path = os.path.join(path, appname) return path def user_data_dir(appname, roaming=False): """ Return full path to the user-specific data dir for this application. "appname" is the name of application. If None, just the system directory is returned. "roaming" (boolean, default False) can be set True to use the Windows roaming appdata directory. That means that for users on a Windows network setup for roaming profiles, this user data will be sync'd on login. See for a discussion of issues. Typical user data directories are: macOS: ~/Library/Application Support/ Unix: ~/.local/share/ # or in $XDG_DATA_HOME, if defined Win XP (not roaming): C:\Documents and Settings\\ ... ...Application Data\ Win XP (roaming): C:\Documents and Settings\\Local ... ...Settings\Application Data\ Win 7 (not roaming): C:\\Users\\AppData\Local\ Win 7 (roaming): C:\\Users\\AppData\Roaming\ For Unix, we follow the XDG spec and support $XDG_DATA_HOME. That means, by default "~/.local/share/". """ if WINDOWS: const = roaming and "CSIDL_APPDATA" or "CSIDL_LOCAL_APPDATA" path = os.path.join(os.path.normpath(_get_win_folder(const)), appname) elif sys.platform == "darwin": path = os.path.join( expanduser('~/Library/Application Support/'), appname, ) else: path = os.path.join( os.getenv('XDG_DATA_HOME', expanduser("~/.local/share")), appname, ) return path def user_config_dir(appname, roaming=True): """Return full path to the user-specific config dir for this application. "appname" is the name of application. If None, just the system directory is returned. "roaming" (boolean, default True) can be set False to not use the Windows roaming appdata directory. That means that for users on a Windows network setup for roaming profiles, this user data will be sync'd on login. See for a discussion of issues. Typical user data directories are: macOS: same as user_data_dir Unix: ~/.config/ Win *: same as user_data_dir For Unix, we follow the XDG spec and support $XDG_CONFIG_HOME. That means, by default "~/.config/". """ if WINDOWS: path = user_data_dir(appname, roaming=roaming) elif sys.platform == "darwin": path = user_data_dir(appname) else: path = os.getenv('XDG_CONFIG_HOME', expanduser("~/.config")) path = os.path.join(path, appname) return path # for the discussion regarding site_config_dirs locations # see def site_config_dirs(appname): """Return a list of potential user-shared config dirs for this application. "appname" is the name of application. Typical user config directories are: macOS: /Library/Application Support// Unix: /etc or $XDG_CONFIG_DIRS[i]// for each value in $XDG_CONFIG_DIRS Win XP: C:\Documents and Settings\All Users\Application ... ...Data\\ Vista: (Fail! "C:\ProgramData" is a hidden *system* directory on Vista.) Win 7: Hidden, but writeable on Win 7: C:\ProgramData\\ """ if WINDOWS: path = os.path.normpath(_get_win_folder("CSIDL_COMMON_APPDATA")) pathlist = [os.path.join(path, appname)] elif sys.platform == 'darwin': pathlist = [os.path.join('/Library/Application Support', appname)] else: # try looking in $XDG_CONFIG_DIRS xdg_config_dirs = os.getenv('XDG_CONFIG_DIRS', '/etc/xdg') if xdg_config_dirs: pathlist = [ os.path.join(expanduser(x), appname) for x in xdg_config_dirs.split(os.pathsep) ] else: pathlist = [] # always look in /etc directly as well pathlist.append('/etc') return pathlist # -- Windows support functions -- def _get_win_folder_from_registry(csidl_name): """ This is a fallback technique at best. I'm not sure if using the registry for this guarantees us the correct answer for all CSIDL_* names. """ import _winreg shell_folder_name = { "CSIDL_APPDATA": "AppData", "CSIDL_COMMON_APPDATA": "Common AppData", "CSIDL_LOCAL_APPDATA": "Local AppData", }[csidl_name] key = _winreg.OpenKey( _winreg.HKEY_CURRENT_USER, r"Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" ) directory, _type = _winreg.QueryValueEx(key, shell_folder_name) return directory def _get_win_folder_with_ctypes(csidl_name): csidl_const = { "CSIDL_APPDATA": 26, "CSIDL_COMMON_APPDATA": 35, "CSIDL_LOCAL_APPDATA": 28, }[csidl_name] buf = ctypes.create_unicode_buffer(1024) ctypes.windll.shell32.SHGetFolderPathW(None, csidl_const, None, 0, buf) # Downgrade to short path name if have highbit chars. See # . has_high_char = False for c in buf: if ord(c) > 255: has_high_char = True break if has_high_char: buf2 = ctypes.create_unicode_buffer(1024) if ctypes.windll.kernel32.GetShortPathNameW(buf.value, buf2, 1024): buf = buf2 return buf.value if WINDOWS: try: import ctypes _get_win_folder = _get_win_folder_with_ctypes except ImportError: _get_win_folder = _get_win_folder_from_registry def _win_path_to_bytes(path): """Encode Windows paths to bytes. Only used on Python 2. Motivation is to be consistent with other operating systems where paths are also returned as bytes. This avoids problems mixing bytes and Unicode elsewhere in the codebase. For more details and discussion see . If encoding using ASCII and MBCS fails, return the original Unicode path. """ for encoding in ('ASCII', 'MBCS'): try: return path.encode(encoding) except (UnicodeEncodeError, LookupError): pass return path PKČe[3L\%\%__pycache__/ui.cpython-36.pycnu[3 PfM-@sddlmZddlmZddlZddlZddlmZmZmZddlZddl Z ddl Z ddl m Z ddl mZddlmZddlmZdd lmZmZdd lmZmZmZdd lmZydd lmZWnek rdZYnXe jeZ d dZ!e!eeZ"Gddde#Z$Gddde#Z%Gddde#Z&Gddde&e$e%e"Z'Gddde&e$e%eeZ(e j)ddZ*Gddde#Z+Gddde#Z,Gdd d e#Z-e j)d!d"Z.dS)#)absolute_import)divisionN)signalSIGINTdefault_int_handler)WINDOWS) format_size)get_indentation)six)BarIncrementalBar) WritelnMixin HIDE_CURSOR SHOW_CURSOR)Spinner)coloramac Cst|jdd}|s|St|dtjt|dtjg}|tt|dg7}ytjj|j|Wntk rv|SX|SdS)NencodingZ empty_fillZfillphases)getattrfiler Z text_typelistjoinencodeUnicodeEncodeError)Z preferredZfallbackrZ charactersr/usr/lib/python3.6/ui.py_select_progress_classsrcs4eZdZdZfddZfddZddZZS)InterruptibleMixina Helper to ensure that self.finish() gets called on keyboard interrupt. This allows downloads to be interrupted without leaving temporary state (like hidden cursors) behind. This class is similar to the progress library's existing SigIntMixin helper, but as of version 1.2, that helper has the following problems: 1. It calls sys.exit(). 2. It discards the existing SIGINT handler completely. 3. It leaves its own handler in place even after an uninterrupted finish, which will have unexpected delayed effects if the user triggers an unrelated keyboard interrupt some time after a progress-displaying download has already completed, for example. cs4tt|j||tt|j|_|jdkr0t|_dS)z= Save the original SIGINT handler for later. N)superr__init__rr handle_sigintoriginal_handlerr)selfargskwargs) __class__rrrNs zInterruptibleMixin.__init__cstt|jtt|jdS)z Restore the original SIGINT handler after finishing. This should happen regardless of whether the progress display finishes normally, or gets interrupted. N)rrfinishrrr!)r")r%rrr&^szInterruptibleMixin.finishcCs|j|j||dS)z Call self.finish() before delegating to the original SIGINT handler. This handler should only be in place while the progress display is active. N)r&r!)r"Zsignumframerrrr hsz InterruptibleMixin.handle_sigint)__name__ __module__ __qualname____doc__rr&r __classcell__rr)r%rr<s  rcsJeZdZfddZeddZeddZeddZd d d ZZ S) DownloadProgressMixincs,tt|j||dtd|j|_dS)N )rr-rr message)r"r#r$)r%rrruszDownloadProgressMixin.__init__cCs t|jS)N)rindex)r"rrr downloadedysz DownloadProgressMixin.downloadedcCs |jdkrdStd|jdS)Ngz...z/s)Zavgr)r"rrrdownload_speed}s z$DownloadProgressMixin.download_speedcCs|jrd|jSdS)Nzeta %s)ZetaZeta_td)r"rrr pretty_etas z DownloadProgressMixin.pretty_etar3ccs*x|D]}|V|j|qW|jdS)N)nextr&)r"itnxrrriters zDownloadProgressMixin.iter)r3) r(r)r*rpropertyr2r4r6r;r,rr)r%rr-ss     r-cseZdZfddZZS) WindowsMixincs\trjrd_ttj||trXtrXtjj_fddj_fddj_ dS)NFcs jjjS)N)rwrappedisattyr)r"rrsz'WindowsMixin.__init__..cs jjjS)N)rr>flushr)r"rrr@s) rZ hide_cursorrr=rrZ AnsiToWin32rr?rA)r"r#r$)r%)r"rrs zWindowsMixin.__init__)r(r)r*rr,rr)r%rr=sr=c@seZdZejZdZdZdS)DownloadProgressBarz %(percent)d%%z0%(downloaded)s %(download_speed)s %(pretty_eta)sN)r(r)r*sysstdoutrr0suffixrrrrrBsrBc@s&eZdZejZdZddZddZdS)DownloadProgressSpinnerz!%(downloaded)s %(download_speed)scCs"t|dstj|j|_t|jS)N_phaser)hasattr itertoolscyclerrGr7)r"rrr next_phases z"DownloadProgressSpinner.next_phasecCsN|j|}|j}|j|}dj||r*dnd||r6dnd|g}|j|dS)Nr5r.)r0rKrErZwriteln)r"r0ZphaserElinerrrupdates    zDownloadProgressSpinner.updateN) r(r)r*rCrDrrErKrMrrrrrFsrFc csRtr dVnB|j s$tjtjkr,dVn"|jtz dVWd|jtXdS)N) rr?loggergetEffectiveLevelloggingINFOwriterr)rrrr hidden_cursors  rSc@s$eZdZddZddZddZdS) RateLimitercCs||_d|_dS)Nr)_min_update_interval_seconds _last_update)r"min_update_interval_secondsrrrrszRateLimiter.__init__cCstj}||j}||jkS)N)timerVrU)r"ZnowZdeltarrrreadys zRateLimiter.readycCstj|_dS)N)rXrV)r"rrrresetszRateLimiter.resetN)r(r)r*rrYrZrrrrrTsrTc@s.eZdZd ddZddZdd Zd d ZdS) InteractiveSpinnerN-\|/?cCs\||_|dkrtj}||_t||_d|_tj||_ |jj dt |jdd|_ dS)NFr.z ... r) _messagerCrD_filerT _rate_limiter _finishedrIrJ _spin_cyclerRr _width)r"r0rZ spin_charsrWrrrrs  zInteractiveSpinner.__init__cCs^|j s td|j}|jj|d|j||jj|t||_|jj|jjdS)Nr.) raAssertionErrorrcr_rRlenrAr`rZ)r"statusZbackuprrr_write s     zInteractiveSpinner._writecCs,|jr dS|jjsdS|jt|jdS)N)rar`rYrhr7rb)r"rrrspins  zInteractiveSpinner.spincCs4|jr dS|j||jjd|jjd|_dS)N T)rarhr_rRrA)r" final_statusrrrr&s    zInteractiveSpinner.finish)Nr\r])r(r)r*rrhrir&rrrrr[s   r[c@s.eZdZd ddZddZddZdd Zd S) NonInteractiveSpinner<cCs$||_d|_t||_|jddS)NFZstarted)r^rarTr`_update)r"r0rWrrrr*s zNonInteractiveSpinner.__init__cCs*|j s t|jjtjd|j|dS)Nz%s: %s)rarer`rZrNinfor^)r"rgrrrrn0s  zNonInteractiveSpinner._updatecCs&|jr dS|jjsdS|jddS)Nzstill running...)rar`rYrn)r"rrrri5s  zNonInteractiveSpinner.spincCs$|jr dS|jd|fd|_dS)Nzfinished with status '%s'T)rarn)r"rkrrrr&<szNonInteractiveSpinner.finishN)rm)r(r)r*rrnrir&rrrrrl)s rlccstjjr"tjtjkr"t|}nt|}y t tj |VWdQRXWn>t k rj|j dYn*t k r|j dYn X|j ddS)NZcancelederrordone) rCrDr?rNrOrPrQr[rlrSKeyboardInterruptr& Exception)r0Zspinnerrrr open_spinnerCs    rt)/Z __future__rrrIrCrrrrX contextlibrPZ pip.compatrZ pip.utilsrZpip.utils.loggingr Z pip._vendorr Zpip._vendor.progress.barr r Zpip._vendor.progress.helpersr rrZpip._vendor.progress.spinnerrrrsZ getLoggerr(rNrZ_BaseBarobjectrr-r=rBrFcontextmanagerrSrTr[rlrtrrrrsB          7 !0PKČe[~ __pycache__/build.cpython-36.pycnu[3 Pf @s<ddlmZddlZddlZddlmZGdddeZdS))absolute_importN)rmtreec@s6eZdZd ddZddZddZdd Zd d ZdS) BuildDirectoryNcCsL|dkr|dkrd}|dkr)format __class____name__r )r r r r__repr__szBuildDirectory.__repr__cCs|jS)N)r )r r r r __enter__"szBuildDirectory.__enter__cCs |jdS)N)cleanup)r excvaluetbr r r__exit__%szBuildDirectory.__exit__cCs|jrt|jdS)N)r rr )r r r rr(szBuildDirectory.cleanup)NN)r __module__ __qualname__rrrrrr r r rr s  r) Z __future__rZos.pathrr Z pip.utilsrobjectrr r r rs  PKČe[_!^+)__pycache__/encoding.cpython-36.opt-1.pycnu[3 Pf@sjddlZddlZddlZejdfejdfejdfejdfejdfejdfej dfgZ ej d Z d d Z dS) Nutf8utf16zutf16-bezutf16-leutf32zutf32-bezutf32-lescoding[:=]\s*([-\w.]+)cCsx0tD](\}}|j|r|t|dj|SqWxV|jdddD]@}|dddkrFtj|rFtj|jdjd}|j|SqFW|jtj dS) zCheck a bytes string for a BOM to correctly detect the encoding Fallback to locale.getpreferredencoding(False) like open() on Python3N r#asciiF) BOMS startswithlendecodesplit ENCODING_REsearchgroupslocalegetpreferredencoding)dataZbomencodingliner/usr/lib/python3.6/encoding.py auto_decodes r)codecsrreBOM_UTF8 BOM_UTF16 BOM_UTF16_BE BOM_UTF16_LE BOM_UTF32 BOM_UTF32_BE BOM_UTF32_LEr compilerrrrrrs  PKČe[[5jXjX#__pycache__/__init__.cpython-36.pycnu[3 Pfml@sddlmZddlmZddlZddlZddlZddlZddlZ ddl Z ddl Z ddl Z ddl Z ddlZddlZddlZddlZddlZddlmZddlmZmZmZddlmZmZmZmZmZmZddl m!Z!ddl"m#Z#dd l$m%Z%dd l&m'Z'e%r dd lm(Z)n dd lm)Z)d ddddddddddddddddddd d!d"d#d$gZ*e j+e,Z-dzZ.d{Z/d|Z0d}Z1e0e.e1e/Z2e0e1Z3yddl4Z4e3e.7Z3Wn e5k re-j6d1YnXyddl7Z7e3e/7Z3Wn e5k re-j6d2YnXd3d4Z8d5d!Z9d6dZ:e'd7d8d9d~d;d Z;ddZ=dd@dZ>dAdBZ?dCdZ@dDdZAdEdZBdFdZCdGdZDejEfdHdIZFdJdZGdKdZHddMdZIdNdZJdOdZKdPdQZLdRdSZMdTdUZNdVdWZOdXdYZPdZd[ZQdLedLd:d:fd\d]ZRd^d_ZSd`daZTdbdZUdcddZVddedZWdfdZXdgdZYddidZZdjdkZ[dldmZ\Gdndodoe]Z^Gdpdqdqe)Z_ej`drdsZadtd ZbGdudvdve]Zcddwd$ZddxdyZedS))absolute_import)dequeN)InstallationError)console_to_str expanduser stdlib_pkgs) site_packages user_siterunning_under_virtualenvvirtualenv_no_globalwrite_delete_marker_filedistutils_scheme) pkg_resources)input)PY2)retry)BytesIO)StringIOrmtree display_path backup_dirasksplitext format_sizeis_installable_dir is_svn_page file_contentssplit_leading_dirhas_leading_dirnormalize_pathrenamesget_terminal_sizeget_prog unzip_file untar_file unpack_filecall_subprocesscaptured_stdout ensure_dirARCHIVE_EXTENSIONSSUPPORTED_EXTENSIONSget_installed_version.tar.bz2.tbz.tar.xz.txz.tlz.tar.lz .tar.lzma.zip.whl.tar.gz.tgz.tarzbz2 module is not availablezlzma module is not availablec Os,yt|Stk r&|||YnXdS)N) __import__ ImportError)Zpkg_or_module_stringZ ExceptionTypeargskwargsr</usr/lib/python3.6/__init__.pyimport_or_raiseIsr>cCsDytj|Wn0tk r>}z|jtjkr.WYdd}~XnXdS)z os.path.makedirs without EEXIST.N)osmakedirsOSErrorerrnoZEEXIST)pather<r<r=r(Ps  c CsDy$tjjtjddkr"dtjSWntttfk r>YnXdS)Nr __main__.py-cz %s -m pipZpip)rErF) r?rCbasenamesysargv executableAttributeError TypeError IndexErrorr<r<r<r=r"Ys i i)Zstop_max_delayZ wait_fixedFcCstj||tddS)N) ignore_errorsonerror)shutilrrmtree_errorhandler)dirrNr<r<r=rcscCs2tj|jtj@r,tj|tj||dSdS)zOn Windows, the files in .svn are read-only, so when rmtree() tries to remove them, an exception is thrown. We catch that here, remove the read-only attribute, and hopefully continue without problems.N)r?statst_modeS_IREADchmodS_IWRITE)funcrCexc_infor<r<r=rQis rQcCsttjjtjj|}tjddkrB|jtjd}|jtj d}|j tj tjj rpd|t tj d}|S)zTGives the display value for a given path, making it relative to cwd if possible.rreplace.N)r?rCnormcaseabspathrH version_infodecodegetfilesystemencodingencodegetdefaultencoding startswithgetcwdseplen)rCr<r<r=rxs.bakcCs:d}|}x(tjj||r0|d7}|t|}q W||S)z\Figure out the name of a directory to back up the given dir to (adding .bak, .bak2, etc))r?rCexistsstr)rRextn extensionr<r<r=rs cCs2x&tjjddjD]}||kr|SqWt||S)NZPIP_EXISTS_ACTION)r?environgetsplitr)messageoptionsactionr<r<r=ask_path_existssrvcCsZxTtjjdrtd|t|}|jj}||krNtd|dj|fq|SqWdS)z@Ask the message interactively, with the given possible responsesZ PIP_NO_INPUTz7No input was expected ($PIP_NO_INPUT set); question: %sz[^<]*Revision \d+:z#Powered by (?:]*?>)?Subversion)researchI)Zhtmlr<r<r=rs c Cs$t|d}|jjdSQRXdS)Nrbzutf-8)openreadr`)filenamefpr<r<r=rs ccs x|j|}|sP|VqWdS)z7Yield pieces of data from a file-like object until EOF.N)r)filesizechunkr<r<r= read_chunkss  rcCsh|jdjd}d|krHd|kr4|jd|jdkss rcCs8x2tjD](}tjj||jd}tjj|rdSqWdS)z$Is distribution an editable install?z .egg-linkTF)rHrCr?r{ project_namer)rZ path_itemegg_linkr<r<r=dist_is_editableHs   rcsl|r tndd|r ddndd|r6ddndd|rHtnd d fd d tjDS) a Return a list of installed Distribution objects. If ``local_only`` is True (default), only return installations local to the current virtualenv, if in a virtualenv. ``skip`` argument is an iterable of lower-case project names to ignore; defaults to stdlib_pkgs If ``editables`` is False, don't report editables. If ``editables_only`` is True , only report editables. If ``user_only`` is True , only report installations in the user site directory. cSsdS)NTr<)dr<r<r= local_testjsz/get_installed_distributions..local_testcSsdS)NTr<)rr<r<r= editable_testnsz2get_installed_distributions..editable_testcSs t| S)N)r)rr<r<r=rqscSst|S)N)r)rr<r<r=editables_only_testusz8get_installed_distributions..editables_only_testcSsdS)NTr<)rr<r<r=rxscSsdS)NTr<)rr<r<r= user_test~sz.get_installed_distributions..user_testcs:g|]2}|r|jkr|r|r|r|qSr<)key).0r)rrrskiprr<r= s  z/get_installed_distributions..)rrr working_set)Z local_onlyrZinclude_editablesZeditables_onlyZ user_onlyr<)rrrrrr=get_installed_distributionsQs  rcCsg}tr6tr|jtqN|jttrN|jtntrD|jt|jtx0|D](}tjj||jd}tjj |rT|SqTWdS)a Return the path for the .egg-link file if it exists, otherwise, None. There's 3 scenarios: 1) not in a virtualenv try to find in site.USER_SITE, then site_packages 2) in a no-global virtualenv try to find in site_packages 3) in a yes-global virtualenv try to find in site_packages, then site.USER_SITE (don't look in global location) For #1 and #3, there could be odd cases, where there's an egg-link in 2 locations. This method will just return the first one found. z .egg-linkN) r r appendrr r?rCr{rr)rZsitesZsiteZegglinkr<r<r= egg_link_paths       rcCst|}|r|S|jS)z Get the site-packages location of this distribution. Generally this is dist.location, except in the case of develop-installed packages, where dist.location is the source code location, and we want to know where the egg-link file is. )rlocation)rrr<r<r=rsrc Csdd}|dp|dp|d}|sZy(tjtjtj}||}tj|Wn YnX|sztjjddtjjdd f}t|dt|dfS) zlReturns a tuple (x, y) representing the width(x) and the height(x) in characters of the terminal window.c SsPy4ddl}ddl}ddl}|jd|j||jd}Wn dS|dkrLdS|S)NrZhhZ1234)rr)fcntltermiosstructunpackZioctlZ TIOCGWINSZ)fdrrrcrr<r<r= ioctl_GWINSZsz'get_terminal_size..ioctl_GWINSZrrirZZLINESZCOLUMNSP)r?rctermidO_RDONLYcloserprqint)rrrr<r<r=r!scCstjd}tj||S)zBGet the current umask which involves having to set it temporarily.r)r?umask)maskr<r<r= current_umasks  rc Cst|t|d}ztj|dd}t|jo0|}x|jD]}|j}|j|}|} |rdt |d} t j j || } t j j | } | jds| jdrt| qd}n8|jjtrRd}n$|jjdrfd}ntjd|d }tj||}zt d d |j D}x|j D]}|j }|d krq|rt |d }t jj||}ytj|j|d|Wntjk r YnX|jr"t|q|jrxy|j||Wn8tk rt}ztjd||j |wWYdd}~XnXqy|j|} Wn<ttfk r}ztjd||j |wWYdd}~XnXtt jj|t|d} tj| | WdQRX| j|j|||jd@rt j |dt!dBqWWd|jXdS)a Untar the file (with path `filename`) to the destination `location`. All files are written based on system defaults and umask (i.e. permissions are not preserved), except that regular file members with any execute permissions (user, group, or world) have "chmod +x" applied after being written. Note that for windows, any execute changes using os.chmod are no-ops per the python docs. z.gzz.tgzzr:gzzr:bz2zr:xzz.tarrz-Cannot determine compression type for file %szr:*cSsg|]}|jdkr|jqS)pax_global_header)r)rmemberr<r<r=r(szuntar_file..rri)rz/In the tar file %s the member %s is invalid: %sNrri)"r(ryrBZ2_EXTENSIONS XZ_EXTENSIONSloggerwarningtarfilerrZ getmembersrrr?rCr{Z data_filterr[ZLinkOutsideDestinationErrorr~ZissymZ_extract_memberrwZ extractfileKeyErrorrKrrPZ copyfileobjrutimerrVr) rrrZtarrrrrCexcrZdestfpr<r<r=r$ sh           cCstjj|}|dks,|jjts,tj|rDt|||jd dn|dkslt j |sl|jjt t t rxt||nX|r|jdrtt|rddlm}|d|jj|ntjd |||td |dS) Nzapplication/zipz.whl)rzapplication/x-gzipz text/htmlr) Subversionzsvn+zZCannot unpack file %s (downloaded from %s, content-type: %s); cannot detect archive formatz%Cannot determine archive format of %s)r?rCrryrZIP_EXTENSIONSrZ is_zipfiler#rZ is_tarfileTAR_EXTENSIONSrrr$rdrrZpip.vcs.subversionrZurlrrcriticalr)rrZ content_typelinkrr<r<r=r%`s,       raisecCs,|r d}ntj}|dkrng}xF|D]>} d| ksFd| ksFd| ksFd| krVd| jdd} |j| q"Wdj|}tjd|tjj } |r| j |ytj |tj d||| d} Wn2t k r} ztjd | |WYdd} ~ XnX|dk rNg} x\t| jj}|sP|j}| j|dtjtjkr:tj|q|dk r|jqW| j|dk r~| jrt|jd n |jd | jr|d krtjtjkr| rtjd |tjdj| dtd|| j|fn:|dkrtjd|| j|n|dkrntdt||s(dj| SdS)N  "'z"%s"z\"zRunning command %s)stderrstdinstdoutcwdenvz#Error %s while executing command %serrordonerz Complete output from command %s:roz) ----------------------------------------z,Command "%s" failed with error code %s in %swarnz$Command "%s" had error code %s in %signorezInvalid value: on_returncode=%s) subprocessPIPEr[rr{rdebugr?rpcopyupdatePopenZSTDOUTrwrrrreadlinerstripZgetEffectiveLevel std_loggingDEBUGZspinwait returncodeZfinishrrr ValueErrorrepr)cmdZ show_stdoutrZ on_returncodeZ command_descZ extra_environZspinnerrZ cmd_partspartrprocrZ all_outputliner<r<r=r&sz                  cCsxt|d}|j}WdQRXdtjddg}x4|D],}y|j|}Wntk r\w4YnXPq4Wt|tkstt|S)aRReturn the contents of *filename*. Try to decode the file contents with utf-8, the preferred system encoding (e.g., cp1252 on some Windows machines), and latin1, in that order. Decoding a byte string with latin1 will never raise an error. In the worst case, the returned string will contain some garbage characters. rNzutf-8Flatin1) rrlocalegetpreferredencodingr`UnicodeDecodeErrortyper}AssertionError)rrrZ encodingsencr<r<r=read_text_files  rcCstj|t|dS)N)r?r@r )Z build_dirr<r<r=_make_build_dirs rc@s(eZdZdZddZddZddZdS) FakeFilezQWrap a list of lines in an object with readline() to make ConfigParser happy.cCsdd|D|_dS)Ncss|] }|VqdS)Nr<)rlr<r<r= sz$FakeFile.__init__..)_gen)selflinesr<r<r=__init__szFakeFile.__init__cCsDy*y t|jStk r&|jjSXWntk r>dSXdS)Nro)nextr NameError StopIteration)rr<r<r=rs zFakeFile.readlinecCs|jS)N)r)rr<r<r=__iter__szFakeFile.__iter__N)__name__ __module__ __qualname____doc__rrrr<r<r<r=rs rc@s$eZdZeddZeddZdS) StreamWrappercCs ||_|S)N) orig_stream)clsr!r<r<r= from_streamszStreamWrapper.from_streamcCs|jjS)N)r!encoding)rr<r<r=r$szStreamWrapper.encodingN)rrr classmethodr#propertyr$r<r<r<r=r s r c cs@tt|}tt|tj|ztt|VWdtt||XdS)zReturn a context manager used by captured_stdout/stdin/stderr that temporarily replaces the sys stream *stream_name* with a StringIO. Taken from Lib/support/__init__.py in the CPython repo. N)getattrrHsetattrr r#)Z stream_nameZ orig_stdoutr<r<r=captured_output s  r)cCstdS)zCapture the output of sys.stdout: with captured_stdout() as stdout: print('hello') self.assertEqual(stdout.getvalue(), 'hello ') Taken from Lib/support/__init__.py in the CPython repo. r)r)r<r<r<r=r'/s c@s eZdZdZddZddZdS)cached_propertyzA property that is only computed once per instance and then replaces itself with an ordinary attribute. Deleting the attribute resets the property. Source: https://github.com/bottlepy/bottle/blob/0.11.5/bottle.py#L175 cCst|d|_||_dS)Nr)r'rrX)rrXr<r<r=rCs zcached_property.__init__cCs(|dkr |S|j|}|j|jj<|S)N)rX__dict__r)robjr"valuer<r<r=__get__Gszcached_property.__get__N)rrrrrr.r<r<r<r=r*;sr*cCs@tjj|}|dkrtj}n tj|}|j|}|r<|jSdS)zCGet the installed version of dist_name avoiding pkg_resources cacheN)rZ RequirementparseZ WorkingSetrversion)Z dist_nameZ lookup_dirsZreqrrr<r<r=r+Os     cCst|dddS)zConsume an iterable at C speed.r)maxlenN)r)iteratorr<r<r=consumecsr3)r,r-)r.r/r0r1r2)r3r4)r5r6r7)F)rh)T)T)TNrNNN)N)fZ __future__r collectionsr contextlibrBior Zloggingrrr?rrPrSrrHrrZpip.exceptionsrZ pip.compatrrrZ pip.locationsrr r r r r Z pip._vendorrZpip._vendor.six.movesrZpip._vendor.sixrZpip._vendor.retryingrrr__all__Z getLoggerrrrrrrr)r*bz2r9rZlzmar>r(r"rrQrrrvrrrrrDEFAULT_BUFFER_SIZErrrrrr rrrrrrrrrr!rr#r$r%r&rrobjectrr contextmanagerr)r'r*r+r3r<r<r<r=s                            5% +S! _   PKČe[~N=X=X)__pycache__/__init__.cpython-36.opt-1.pycnu[3 Pfml@sddlmZddlmZddlZddlZddlZddlZddlZ ddl Z ddl Z ddl Z ddl Z ddlZddlZddlZddlZddlZddlmZddlmZmZmZddlmZmZmZmZmZmZddl m!Z!ddl"m#Z#dd l$m%Z%dd l&m'Z'e%r dd lm(Z)n dd lm)Z)d ddddddddddddddddddd d!d"d#d$gZ*e j+e,Z-dzZ.d{Z/d|Z0d}Z1e0e.e1e/Z2e0e1Z3yddl4Z4e3e.7Z3Wn e5k re-j6d1YnXyddl7Z7e3e/7Z3Wn e5k re-j6d2YnXd3d4Z8d5d!Z9d6dZ:e'd7d8d9d~d;d Z;ddZ=dd@dZ>dAdBZ?dCdZ@dDdZAdEdZBdFdZCdGdZDejEfdHdIZFdJdZGdKdZHddMdZIdNdZJdOdZKdPdQZLdRdSZMdTdUZNdVdWZOdXdYZPdZd[ZQdLedLd:d:fd\d]ZRd^d_ZSd`daZTdbdZUdcddZVddedZWdfdZXdgdZYddidZZdjdkZ[dldmZ\Gdndodoe]Z^Gdpdqdqe)Z_ej`drdsZadtd ZbGdudvdve]Zcddwd$ZddxdyZedS))absolute_import)dequeN)InstallationError)console_to_str expanduser stdlib_pkgs) site_packages user_siterunning_under_virtualenvvirtualenv_no_globalwrite_delete_marker_filedistutils_scheme) pkg_resources)input)PY2)retry)BytesIO)StringIOrmtree display_path backup_dirasksplitext format_sizeis_installable_dir is_svn_page file_contentssplit_leading_dirhas_leading_dirnormalize_pathrenamesget_terminal_sizeget_prog unzip_file untar_file unpack_filecall_subprocesscaptured_stdout ensure_dirARCHIVE_EXTENSIONSSUPPORTED_EXTENSIONSget_installed_version.tar.bz2.tbz.tar.xz.txz.tlz.tar.lz .tar.lzma.zip.whl.tar.gz.tgz.tarzbz2 module is not availablezlzma module is not availablec Os,yt|Stk r&|||YnXdS)N) __import__ ImportError)Zpkg_or_module_stringZ ExceptionTypeargskwargsr</usr/lib/python3.6/__init__.pyimport_or_raiseIsr>cCsDytj|Wn0tk r>}z|jtjkr.WYdd}~XnXdS)z os.path.makedirs without EEXIST.N)osmakedirsOSErrorerrnoZEEXIST)pather<r<r=r(Ps  c CsDy$tjjtjddkr"dtjSWntttfk r>YnXdS)Nr __main__.py-cz %s -m pipZpip)rErF) r?rCbasenamesysargv executableAttributeError TypeError IndexErrorr<r<r<r=r"Ys i i)Zstop_max_delayZ wait_fixedFcCstj||tddS)N) ignore_errorsonerror)shutilrrmtree_errorhandler)dirrNr<r<r=rcscCs2tj|jtj@r,tj|tj||dSdS)zOn Windows, the files in .svn are read-only, so when rmtree() tries to remove them, an exception is thrown. We catch that here, remove the read-only attribute, and hopefully continue without problems.N)r?statst_modeS_IREADchmodS_IWRITE)funcrCexc_infor<r<r=rQis rQcCsttjjtjj|}tjddkrB|jtjd}|jtj d}|j tj tjj rpd|t tj d}|S)zTGives the display value for a given path, making it relative to cwd if possible.rreplace.N)r?rCnormcaseabspathrH version_infodecodegetfilesystemencodingencodegetdefaultencoding startswithgetcwdseplen)rCr<r<r=rxs.bakcCs:d}|}x(tjj||r0|d7}|t|}q W||S)z\Figure out the name of a directory to back up the given dir to (adding .bak, .bak2, etc))r?rCexistsstr)rRextn extensionr<r<r=rs cCs2x&tjjddjD]}||kr|SqWt||S)NZPIP_EXISTS_ACTION)r?environgetsplitr)messageoptionsactionr<r<r=ask_path_existssrvcCsZxTtjjdrtd|t|}|jj}||krNtd|dj|fq|SqWdS)z@Ask the message interactively, with the given possible responsesZ PIP_NO_INPUTz7No input was expected ($PIP_NO_INPUT set); question: %sz[^<]*Revision \d+:z#Powered by (?:]*?>)?Subversion)researchI)Zhtmlr<r<r=rs c Cs$t|d}|jjdSQRXdS)Nrbzutf-8)openreadr`)filenamefpr<r<r=rs ccs x|j|}|sP|VqWdS)z7Yield pieces of data from a file-like object until EOF.N)r)filesizechunkr<r<r= read_chunkss  rcCsh|jdjd}d|krHd|kr4|jd|jdkss rcCs8x2tjD](}tjj||jd}tjj|rdSqWdS)z$Is distribution an editable install?z .egg-linkTF)rHrCr?r{ project_namer)rZ path_itemegg_linkr<r<r=dist_is_editableHs   rcsl|r tndd|r ddndd|r6ddndd|rHtnd d fd d tjDS) a Return a list of installed Distribution objects. If ``local_only`` is True (default), only return installations local to the current virtualenv, if in a virtualenv. ``skip`` argument is an iterable of lower-case project names to ignore; defaults to stdlib_pkgs If ``editables`` is False, don't report editables. If ``editables_only`` is True , only report editables. If ``user_only`` is True , only report installations in the user site directory. cSsdS)NTr<)dr<r<r= local_testjsz/get_installed_distributions..local_testcSsdS)NTr<)rr<r<r= editable_testnsz2get_installed_distributions..editable_testcSs t| S)N)r)rr<r<r=rqscSst|S)N)r)rr<r<r=editables_only_testusz8get_installed_distributions..editables_only_testcSsdS)NTr<)rr<r<r=rxscSsdS)NTr<)rr<r<r= user_test~sz.get_installed_distributions..user_testcs:g|]2}|r|jkr|r|r|r|qSr<)key).0r)rrrskiprr<r= s  z/get_installed_distributions..)rrr working_set)Z local_onlyrZinclude_editablesZeditables_onlyZ user_onlyr<)rrrrrr=get_installed_distributionsQs  rcCsg}tr6tr|jtqN|jttrN|jtntrD|jt|jtx0|D](}tjj||jd}tjj |rT|SqTWdS)a Return the path for the .egg-link file if it exists, otherwise, None. There's 3 scenarios: 1) not in a virtualenv try to find in site.USER_SITE, then site_packages 2) in a no-global virtualenv try to find in site_packages 3) in a yes-global virtualenv try to find in site_packages, then site.USER_SITE (don't look in global location) For #1 and #3, there could be odd cases, where there's an egg-link in 2 locations. This method will just return the first one found. z .egg-linkN) r r appendrr r?rCr{rr)rZsitesZsiteZegglinkr<r<r= egg_link_paths       rcCst|}|r|S|jS)z Get the site-packages location of this distribution. Generally this is dist.location, except in the case of develop-installed packages, where dist.location is the source code location, and we want to know where the egg-link file is. )rlocation)rrr<r<r=rsrc Csdd}|dp|dp|d}|sZy(tjtjtj}||}tj|Wn YnX|sztjjddtjjdd f}t|dt|dfS) zlReturns a tuple (x, y) representing the width(x) and the height(x) in characters of the terminal window.c SsPy4ddl}ddl}ddl}|jd|j||jd}Wn dS|dkrLdS|S)NrZhhZ1234)rr)fcntltermiosstructunpackZioctlZ TIOCGWINSZ)fdrrrcrr<r<r= ioctl_GWINSZsz'get_terminal_size..ioctl_GWINSZrrirZZLINESZCOLUMNSP)r?rctermidO_RDONLYcloserprqint)rrrr<r<r=r!scCstjd}tj||S)zBGet the current umask which involves having to set it temporarily.r)r?umask)maskr<r<r= current_umasks  rc Cst|t|d}ztj|dd}t|jo0|}x|jD]}|j}|j|}|} |rdt |d} t j j || } t j j | } | jds| jdrt| qd}n8|jjtrRd}n$|jjdrfd}ntjd|d }tj||}zt d d |j D}x|j D]}|j }|d krq|rt |d }t jj||}ytj|j|d|Wntjk r YnX|jr"t|q|jrxy|j||Wn8tk rt}ztjd||j |wWYdd}~XnXqy|j|} Wn<ttfk r}ztjd||j |wWYdd}~XnXtt jj|t|d} tj| | WdQRX| j|j|||jd@rt j |dt!dBqWWd|jXdS)a Untar the file (with path `filename`) to the destination `location`. All files are written based on system defaults and umask (i.e. permissions are not preserved), except that regular file members with any execute permissions (user, group, or world) have "chmod +x" applied after being written. Note that for windows, any execute changes using os.chmod are no-ops per the python docs. z.gzz.tgzzr:gzzr:bz2zr:xzz.tarrz-Cannot determine compression type for file %szr:*cSsg|]}|jdkr|jqS)pax_global_header)r)rmemberr<r<r=r(szuntar_file..rri)rz/In the tar file %s the member %s is invalid: %sNrri)"r(ryrBZ2_EXTENSIONS XZ_EXTENSIONSloggerwarningtarfilerrZ getmembersrrr?rCr{Z data_filterr[ZLinkOutsideDestinationErrorr~ZissymZ_extract_memberrwZ extractfileKeyErrorrKrrPZ copyfileobjrutimerrVr) rrrZtarrrrrCexcrZdestfpr<r<r=r$ sh           cCstjj|}|dks,|jjts,tj|rDt|||jd dn|dkslt j |sl|jjt t t rxt||nX|r|jdrtt|rddlm}|d|jj|ntjd |||td |dS) Nzapplication/zipz.whl)rzapplication/x-gzipz text/htmlr) Subversionzsvn+zZCannot unpack file %s (downloaded from %s, content-type: %s); cannot detect archive formatz%Cannot determine archive format of %s)r?rCrryrZIP_EXTENSIONSrZ is_zipfiler#rZ is_tarfileTAR_EXTENSIONSrrr$rdrrZpip.vcs.subversionrZurlrrcriticalr)rrZ content_typelinkrr<r<r=r%`s,       raisecCs,|r d}ntj}|dkrng}xF|D]>} d| ksFd| ksFd| ksFd| krVd| jdd} |j| q"Wdj|}tjd|tjj } |r| j |ytj |tj d||| d} Wn2t k r} ztjd | |WYdd} ~ XnX|dk rNg} x\t| jj}|sP|j}| j|dtjtjkr:tj|q|dk r|jqW| j|dk r~| jrt|jd n |jd | jr|d krtjtjkr| rtjd |tjdj| dtd|| j|fn:|dkrtjd|| j|n|dkrntdt||s(dj| SdS)N  "'z"%s"z\"zRunning command %s)stderrstdinstdoutcwdenvz#Error %s while executing command %serrordonerz Complete output from command %s:roz) ----------------------------------------z,Command "%s" failed with error code %s in %swarnz$Command "%s" had error code %s in %signorezInvalid value: on_returncode=%s) subprocessPIPEr[rr{rdebugr?rpcopyupdatePopenZSTDOUTrwrrrreadlinerstripZgetEffectiveLevel std_loggingDEBUGZspinwait returncodeZfinishrrr ValueErrorrepr)cmdZ show_stdoutrZ on_returncodeZ command_descZ extra_environZspinnerrZ cmd_partspartrprocrZ all_outputliner<r<r=r&sz                  cCsht|d}|j}WdQRXdtjddg}x4|D],}y|j|}Wntk r\w4YnXPq4W|S)aRReturn the contents of *filename*. Try to decode the file contents with utf-8, the preferred system encoding (e.g., cp1252 on some Windows machines), and latin1, in that order. Decoding a byte string with latin1 will never raise an error. In the worst case, the returned string will contain some garbage characters. rNzutf-8Flatin1)rrlocalegetpreferredencodingr`UnicodeDecodeError)rrrZ encodingsencr<r<r=read_text_files  r cCstj|t|dS)N)r?r@r )Z build_dirr<r<r=_make_build_dirs rc@s(eZdZdZddZddZddZdS) FakeFilezQWrap a list of lines in an object with readline() to make ConfigParser happy.cCsdd|D|_dS)Ncss|] }|VqdS)Nr<)rlr<r<r= sz$FakeFile.__init__..)_gen)selflinesr<r<r=__init__szFakeFile.__init__cCsDy*y t|jStk r&|jjSXWntk r>dSXdS)Nro)nextr NameError StopIteration)rr<r<r=rs zFakeFile.readlinecCs|jS)N)r)rr<r<r=__iter__szFakeFile.__iter__N)__name__ __module__ __qualname____doc__rrrr<r<r<r=rs rc@s$eZdZeddZeddZdS) StreamWrappercCs ||_|S)N) orig_stream)clsrr<r<r= from_streamszStreamWrapper.from_streamcCs|jjS)N)rencoding)rr<r<r=r"szStreamWrapper.encodingN)rrr classmethodr!propertyr"r<r<r<r=rs rc cs@tt|}tt|tj|ztt|VWdtt||XdS)zReturn a context manager used by captured_stdout/stdin/stderr that temporarily replaces the sys stream *stream_name* with a StringIO. Taken from Lib/support/__init__.py in the CPython repo. N)getattrrHsetattrrr!)Z stream_nameZ orig_stdoutr<r<r=captured_output s  r'cCstdS)zCapture the output of sys.stdout: with captured_stdout() as stdout: print('hello') self.assertEqual(stdout.getvalue(), 'hello ') Taken from Lib/support/__init__.py in the CPython repo. r)r'r<r<r<r=r'/s c@s eZdZdZddZddZdS)cached_propertyzA property that is only computed once per instance and then replaces itself with an ordinary attribute. Deleting the attribute resets the property. Source: https://github.com/bottlepy/bottle/blob/0.11.5/bottle.py#L175 cCst|d|_||_dS)Nr)r%rrX)rrXr<r<r=rCs zcached_property.__init__cCs(|dkr |S|j|}|j|jj<|S)N)rX__dict__r)robjr valuer<r<r=__get__Gszcached_property.__get__N)rrrrrr,r<r<r<r=r(;sr(cCs@tjj|}|dkrtj}n tj|}|j|}|r<|jSdS)zCGet the installed version of dist_name avoiding pkg_resources cacheN)rZ RequirementparseZ WorkingSetrversion)Z dist_nameZ lookup_dirsZreqrrr<r<r=r+Os     cCst|dddS)zConsume an iterable at C speed.r)maxlenN)r)iteratorr<r<r=consumecsr1)r,r-)r.r/r0r1r2)r3r4)r5r6r7)F)rh)T)T)TNrNNN)N)fZ __future__r collectionsr contextlibrBior Zloggingrrr?rrPrSrrHrrZpip.exceptionsrZ pip.compatrrrZ pip.locationsrr r r r r Z pip._vendorrZpip._vendor.six.movesrZpip._vendor.sixrZpip._vendor.retryingrrr__all__Z getLoggerrrrrrrr)r*bz2r9rZlzmar>r(r"rrQrrrvrrrrrDEFAULT_BUFFER_SIZErrrrrr rrrrrrrrrr!rr#r$r%r&r robjectrrcontextmanagerr'r'r(r+r1r<r<r<r=s                            5% +S! _   PKČe[a 44+__pycache__/filesystem.cpython-36.opt-1.pycnu[3 Pf@s(ddlZddlZddlmZddZdS)N) get_path_uidc CsttdsdSd}xp||krtjj|rntjdkr^y t|}Wntk rTdSX|dkStj|tjSq|tjj |}}qWdS)NgeteuidTrF) hasattrospathlexistsrrOSErroraccessW_OKdirname)rZpreviousZpath_uidr /usr/lib/python3.6/filesystem.pycheck_path_owners     r)rZos.pathZ pip.compatrrr r r r s PKČe[a 44%__pycache__/filesystem.cpython-36.pycnu[3 Pf@s(ddlZddlZddlmZddZdS)N) get_path_uidc CsttdsdSd}xp||krtjj|rntjdkr^y t|}Wntk rTdSX|dkStj|tjSq|tjj |}}qWdS)NgeteuidTrF) hasattrospathlexistsrrOSErroraccessW_OKdirname)rZpreviousZpath_uidr /usr/lib/python3.6/filesystem.pycheck_path_owners     r)rZos.pathZ pip.compatrrr r r r s PKČe[~&__pycache__/build.cpython-36.opt-1.pycnu[3 Pf @s<ddlmZddlZddlZddlmZGdddeZdS))absolute_importN)rmtreec@s6eZdZd ddZddZddZdd Zd d ZdS) BuildDirectoryNcCsL|dkr|dkrd}|dkr)format __class____name__r )r r r r__repr__szBuildDirectory.__repr__cCs|jS)N)r )r r r r __enter__"szBuildDirectory.__enter__cCs |jdS)N)cleanup)r excvaluetbr r r__exit__%szBuildDirectory.__exit__cCs|jrt|jdS)N)r rr )r r r rr(szBuildDirectory.cleanup)NN)r __module__ __qualname__rrrrrr r r rr s  r) Z __future__rZos.pathrr Z pip.utilsrobjectrr r r rs  PKČe[b#-,__pycache__/deprecation.cpython-36.opt-1.pycnu[3 Pf@sdZddlmZddlZddlZGdddeZGdddeZGdd d eZ Gd d d eeZ Gd d d eZ da dddZ ddZdS)zN A module that implements tooling to enable easy warnings about deprecations. )absolute_importNc@s eZdZdS)PipDeprecationWarningN)__name__ __module__ __qualname__rr!/usr/lib/python3.6/deprecation.pyr src@s eZdZdS)PendingN)rrrrrrrr sr c@s eZdZdS)RemovedInPip10WarningN)rrrrrrrr sr c@s eZdZdS)RemovedInPip11WarningN)rrrrrrrr sr c@s eZdZdS)Python26DeprecationWarningN)rrrrrrrr sr cCsx|dk r$tdk rtt||||||nPt|trbtjd}d|}t|trV|j|qt|j|nt||||||dS)Nzpip.deprecationszDEPRECATION: %s)_warnings_showwarning issubclassrloggingZ getLoggerr Zwarningerror)messagecategoryfilenamelinenofilelineZloggerZ log_messagerrr _showwarning$s     rcCs(tjdtddtdkr$tjatt_dS)NdefaultT)append)warnings simplefilterrr showwarningrrrrrinstall_warning_loggerDsr)NN)__doc__Z __future__rrrWarningrobjectr r r r r rrrrrrs  PKČe[_!^+#__pycache__/encoding.cpython-36.pycnu[3 Pf@sjddlZddlZddlZejdfejdfejdfejdfejdfejdfej dfgZ ej d Z d d Z dS) Nutf8utf16zutf16-bezutf16-leutf32zutf32-bezutf32-lescoding[:=]\s*([-\w.]+)cCsx0tD](\}}|j|r|t|dj|SqWxV|jdddD]@}|dddkrFtj|rFtj|jdjd}|j|SqFW|jtj dS) zCheck a bytes string for a BOM to correctly detect the encoding Fallback to locale.getpreferredencoding(False) like open() on Python3N r#asciiF) BOMS startswithlendecodesplit ENCODING_REsearchgroupslocalegetpreferredencoding)dataZbomencodingliner/usr/lib/python3.6/encoding.py auto_decodes r)codecsrreBOM_UTF8 BOM_UTF16 BOM_UTF16_BE BOM_UTF16_LE BOM_UTF32 BOM_UTF32_BE BOM_UTF32_LEr compilerrrrrrs  PKČe[UtFCC&__pycache__/glibc.cpython-36.opt-1.pycnu[3 Pf{ @sPddlmZddlZddlZddlZddlZddZddZddZd d Z dS) )absolute_importNc CsPtjd}y |j}Wntk r(dSXtj|_|}t|tsL|jd}|S)z9Returns glibc version string, or None if not using glibc.Nascii) ctypesZCDLLgnu_get_libc_versionAttributeErrorZc_char_pZrestype isinstancestrdecode)Zprocess_namespacer version_strr /usr/lib/python3.6/glibc.pyglibc_version_string s    r cCsHtjd|}|s$tjd|tdSt|jd|koFt|jd|kS)Nz$(?P[0-9]+)\.(?P[0-9]+)z=Expected glibc version with 2 components major.minor, got: %sFmajorminor)rematchwarningswarnRuntimeWarningintgroup)r required_major minimum_minormr r r check_glibc_version#s  rcCst}|dkrdSt|||S)NF)r r)rrr r r r have_compatible_glibc3srcCs"t}|dkrtjSd|fSdS)NZglibc)r platformlibc_ver)Z glibc_versionr r r rKsr) Z __future__rrrrrr rrrr r r r s PKČe[:gg#__pycache__/outdated.cpython-36.pycnu[3 Pfe@sddlmZddlZddlZddlZddlZddlZddlm Z ddl m Z ddl mZmZddlmZddlmZmZddlmZmZdd lmZd ZejeZGd d d eZGd ddeZ ddZ!ddZ"ddZ#dS))absolute_importN)lockfile)version) total_secondsWINDOWS)PyPI)USER_CACHE_DIRrunning_under_virtualenv) ensure_dirget_installed_version)check_path_ownerz%Y-%m-%dT%H:%M:%SZc@seZdZddZddZdS)VirtualenvSelfCheckStatecCs\tjjtjd|_y&t|j}tj||_ WdQRXWnt t fk rVi|_ YnXdS)Nzpip-selfcheck.json) ospathjoinsysprefixstatefile_pathopenjsonloadstateIOError ValueError)self statefiler/usr/lib/python3.6/outdated.py__init__s  z!VirtualenvSelfCheckState.__init__c Cs:t|jd$}tj|jt|d|dddWdQRXdS)Nw) last_check pypi_versionT,:) sort_keys separators)r"r#)rrrdumpstrftimeSELFCHECK_DATE_FMT)rr! current_timerrrrsave$szVirtualenvSelfCheckState.saveN)__name__ __module__ __qualname__rr*rrrrr s r c@seZdZddZddZdS)GlobalSelfCheckStatecCsbtjjtd|_y,t|j}tj|tj |_ WdQRXWn t t t fk r\i|_ YnXdS)Nzselfcheck.json)rrrrrrrrrrrrrKeyError)rrrrrr3s   zGlobalSelfCheckState.__init__cCsttjj|jsdSttjj|jtj|jztjj|jrft |j}t j |}WdQRXni}|j t |d|tj<t |jd}t j||dddWdQRXWdQRXdS)N)r r!rTr"r#)r$r%)r"r#)r rrdirnamerr rZLockFileexistsrrrr'r(rrr&)rr!r)rrrrrr*=s  zGlobalSelfCheckState.saveN)r+r,r-rr*rrrrr.2s r.cCstr tStSdS)N)r r r.rrrrload_selfcheck_statefileXsr2c CsFddl}y"|jd}|jdo*d|jdkS|jk r@dSXdS)zChecks whether pip was installed by pip This is used not to display the upgrade message when pip is in fact installed by system package manager, such as dnf on Fedora. rNpipZ INSTALLERF) pkg_resourcesZget_distributionZ has_metadataZget_metadata_linesZDistributionNotFound)r4Zdistrrrpip_installed_by_pip_s  r5c CsFtd}|dkrdStj|}d}yt}tjj}d|jkrxd|jkrxtjj|jdt}t ||dkrx|jd}|dkr|j t j dd id }|j d d tt|jd tjdDd}|j||tj|}||kr|j|jkrtrtrd} nd} tjd||| Wn$tk r@tjdddYnXdS)zCheck for an update for pip. Limit the frequency of checks to once per week. State is stored either in the active virtualenv or in the user's USER_CACHE_DIR keyed off the prefix of the pip script path. r3Nr r!<ZAcceptzapplication/json)ZheaderscSsg|]}tj|js|qSr)packaging_versionparseZ is_prerelease).0vrrr sz%pip_version_check..Zreleases)keyz python -m pipzYou are using pip version %s, however version %s is available. You should consider upgrading via the '%s install --upgrade pip' command.z5There was an error checking the latest version of pipT)exc_infoi`'i: )r r9r:r2datetimeZutcnowrZstrptimer(rgetrZ pip_json_urlZraise_for_statussortedlistrr*Z base_versionr5rloggerZwarning Exceptiondebug) ZsessionZinstalled_versionZ pip_versionr!rr)r ZrespZremote_versionZpip_cmdrrrpip_version_checknsL        rJ)$Z __future__rrCrZloggingZos.pathrrZ pip._vendorrZpip._vendor.packagingrr9Z pip.compatrrZ pip.modelsrZ pip.locationsrr Z pip.utilsr r Zpip.utils.filesystemr r(Z getLoggerr+rGobjectr r.r2r5rJrrrrs&      &PKČe[''(__pycache__/logging.cpython-36.opt-1.pycnu[3 Pf @sddlmZddlZddlZddlZddlZy ddlZWnek rTddlZYnXddl m Z ddl m Z yddl mZWnek rdZYnXejZde_ejdddZd d ZGd d d ejZd dZGdddejZGdddejjZGdddejZdS))absolute_importN)WINDOWS) ensure_dir)coloramac cs.tj|7_z dVWdtj|8_XdS)zv A context manager which will cause the log output to be indented for any log messages emitted inside it. N) _log_state indentation)Znumr /usr/lib/python3.6/logging.py indent_logs r cCs ttddS)Nrr)getattrrr r r r get_indentation)sr c@seZdZddZdS)IndentingFormattercCs,tjj||}djdd|jdD}|S)z Calls the standard formatter, but will indent all of the log messages by our current indentation level. cSsg|]}dt|qS) )r ).0liner r r 6sz-IndentingFormatter.format..T)logging Formatterformatjoin splitlines)selfrecordZ formattedr r r r/s zIndentingFormatter.formatN)__name__ __module__ __qualname__rr r r r r-srcsfdd}|S)Ncsdjt|tjjgS)Nr)rlistrZStyleZ RESET_ALL)Zinp)colorsr r wrapped=sz_color_wrap..wrappedr )rr r )rr _color_wrap<s r!c@sTeZdZer2ejeejjfej eejj fgZ ngZ dddZ ddZ ddZdS) ColorizedStreamHandlerNcCs(tjj||tr$tr$tj|j|_dS)N)r StreamHandler__init__rr AnsiToWin32stream)rr&r r r r$NszColorizedStreamHandler.__init__cCsRtsdSt|jtjs|jn|jj}t|dr:|jr:dStjj ddkrNdSdS)NFisattyTZTERMZANSI) r isinstancer&r%r hasattrr'osenvironget)rZ real_streamr r r should_colorTsz#ColorizedStreamHandler.should_colorcCsBtjj||}|jr>x&|jD]\}}|j|kr||}PqW|S)N)rr#rr-COLORSlevelno)rrmsglevelZcolorr r r ris zColorizedStreamHandler.format)N)rrrrrZERRORr!ZForeZREDZWARNINGZYELLOWr.r$r-rr r r r r"Bs r"c@seZdZddZdS)BetterRotatingFileHandlercCs ttjj|jtjjj|S)N) rr*pathdirnameZ baseFilenamerhandlersRotatingFileHandler_open)rr r r r7wszBetterRotatingFileHandler._openN)rrrr7r r r r r2usr2c@seZdZddZddZdS)MaxLevelFiltercCs ||_dS)N)r1)rr1r r r r$~szMaxLevelFilter.__init__cCs |j|jkS)N)r/r1)rrr r r filterszMaxLevelFilter.filterN)rrrr$r9r r r r r8|sr8)r) Z __future__r contextlibrZlogging.handlersr*Z threading ImportErrorZdummy_threadingZ pip.compatrZ pip.utilsrZ pip._vendorr ExceptionZlocalrrcontextmanagerr r rrr!r#r"r5r6r2Filterr8r r r r s0      3PKČe[''"__pycache__/logging.cpython-36.pycnu[3 Pf @sddlmZddlZddlZddlZddlZy ddlZWnek rTddlZYnXddl m Z ddl m Z yddl mZWnek rdZYnXejZde_ejdddZd d ZGd d d ejZd dZGdddejZGdddejjZGdddejZdS))absolute_importN)WINDOWS) ensure_dir)coloramac cs.tj|7_z dVWdtj|8_XdS)zv A context manager which will cause the log output to be indented for any log messages emitted inside it. N) _log_state indentation)Znumr /usr/lib/python3.6/logging.py indent_logs r cCs ttddS)Nrr)getattrrr r r r get_indentation)sr c@seZdZddZdS)IndentingFormattercCs,tjj||}djdd|jdD}|S)z Calls the standard formatter, but will indent all of the log messages by our current indentation level. cSsg|]}dt|qS) )r ).0liner r r 6sz-IndentingFormatter.format..T)logging Formatterformatjoin splitlines)selfrecordZ formattedr r r r/s zIndentingFormatter.formatN)__name__ __module__ __qualname__rr r r r r-srcsfdd}|S)Ncsdjt|tjjgS)Nr)rlistrZStyleZ RESET_ALL)Zinp)colorsr r wrapped=sz_color_wrap..wrappedr )rr r )rr _color_wrap<s r!c@sTeZdZer2ejeejjfej eejj fgZ ngZ dddZ ddZ ddZdS) ColorizedStreamHandlerNcCs(tjj||tr$tr$tj|j|_dS)N)r StreamHandler__init__rr AnsiToWin32stream)rr&r r r r$NszColorizedStreamHandler.__init__cCsRtsdSt|jtjs|jn|jj}t|dr:|jr:dStjj ddkrNdSdS)NFisattyTZTERMZANSI) r isinstancer&r%r hasattrr'osenvironget)rZ real_streamr r r should_colorTsz#ColorizedStreamHandler.should_colorcCsBtjj||}|jr>x&|jD]\}}|j|kr||}PqW|S)N)rr#rr-COLORSlevelno)rrmsglevelZcolorr r r ris zColorizedStreamHandler.format)N)rrrrrZERRORr!ZForeZREDZWARNINGZYELLOWr.r$r-rr r r r r"Bs r"c@seZdZddZdS)BetterRotatingFileHandlercCs ttjj|jtjjj|S)N) rr*pathdirnameZ baseFilenamerhandlersRotatingFileHandler_open)rr r r r7wszBetterRotatingFileHandler._openN)rrrr7r r r r r2usr2c@seZdZddZddZdS)MaxLevelFiltercCs ||_dS)N)r1)rr1r r r r$~szMaxLevelFilter.__init__cCs |j|jkS)N)r/r1)rrr r r filterszMaxLevelFilter.filterN)rrrr$r9r r r r r8|sr8)r) Z __future__r contextlibrZlogging.handlersr*Z threading ImportErrorZdummy_threadingZ pip.compatrZ pip.utilsrZ pip._vendorr ExceptionZlocalrrcontextmanagerr r rrr!r#r"r5r6r2Filterr8r r r r s0      3PKČe[H '__pycache__/hashes.cpython-36.opt-1.pycnu[3 Pf2 @szddlmZddlZddlmZmZmZddlmZddl m Z m Z m Z dZ dddgZGd d d eZGd d d eZdS) )absolute_importN) HashMismatch HashMissingInstallationError) read_chunks) iteritemsiterkeys itervaluesZsha256Zsha384Zsha512c@sJeZdZdZdddZddZddZd d Zd d Zd dZ ddZ dS)HasheszaA wrapper that builds multiple hashes at once and checks them against known-good values NcCs|dkr in||_dS)zo :param hashes: A dict of algorithm names pointing to lists of allowed hex digests N)_allowed)selfhashesr/usr/lib/python3.6/hashes.py__init__szHashes.__init__c Csi}xJt|jD]<}ytj|||<Wqttfk rJtd|YqXqWx(|D] }xt|D]}|j|qdWqVWx*t |D]\}}|j |j|krdSqW|j |dS)zCheck good hashes against ones built from iterable of chunks of data. Raise HashMismatch if none match. zUnknown hash name: %sN) rr hashlibnew ValueError TypeErrorrr updater hexdigest_raise)r ZchunksgotsZ hash_namechunkhashZgotrrrcheck_against_chunks s zHashes.check_against_chunkscCst|j|dS)N)rr )r rrrrr7sz Hashes._raisecCs|jt|S)zaCheck good hashes against a file-like object Raise HashMismatch if none match. )rr)r filerrrcheck_against_file:szHashes.check_against_filec Cs t|d }|j|SQRXdS)Nrb)openr)r pathrrrrcheck_against_pathBs zHashes.check_against_pathcCs t|jS)z,Return whether I know any known-good hashes.)boolr )r rrr __nonzero__FszHashes.__nonzero__cCs|jS)N)r#)r rrr__bool__JszHashes.__bool__)N) __name__ __module__ __qualname____doc__rrrrr!r#r$rrrrr s r cs(eZdZdZfddZddZZS) MissingHasheszA workalike for Hashes used when we're missing a hash for a requirement It computes the actual hash of the requirement and raises a HashMissing exception showing it to the user. cstt|jtgiddS)z!Don't offer the ``hashes`` kwarg.)r N)superr)r FAVORITE_HASH)r ) __class__rrrUszMissingHashes.__init__cCst|tjdS)N)rr+r)r rrrrr[szMissingHashes._raise)r%r&r'r(rr __classcell__rr)r,rr)Ns r))Z __future__rrZpip.exceptionsrrrZ pip.utilsrZpip._vendor.sixrrr r+Z STRONG_HASHESobjectr r)rrrrs   :PKČe[& Z$__pycache__/packaging.cpython-36.pycnu[3 Pf @s~ddlmZddlmZddlZddlZddlmZddlmZddl m Z ddl m Z ej eZdd Zd d Zd d ZdS))absolute_import) FeedParserN) specifiers)version) pkg_resources) exceptionscCs>|dkr dStj|}tjdjtttjdd}||kS)aG Check if the python version in use match the `requires_python` specifier. Returns `True` if the version of python in use matches the requirement. Returns `False` if the version of python in use does not matches the requirement. Raises an InvalidSpecifier if `requires_python` have an invalid format. NT.) rZ SpecifierSetrparsejoinmapstrsys version_info)requires_pythonZrequires_python_specifierZpython_versionr/usr/lib/python3.6/packaging.pycheck_requires_pythons   rcCs8t|tjr |jdr |jdS|jdr4|jdSdS)NZMETADATAzPKG-INFO) isinstancerZDistInfoDistributionZ has_metadata get_metadata)distrrrr%s     rcCst|}t}|j||j}|jd}y8t|s`tjd|j|dj t t t j ddfWn8tjk r}ztjd|j||fdSd}~XnXdS)NzRequires-Pythonz4%s requires Python '%s' but the running Python is %srr z7Package %s has an invalid Requires-Python entry %s - %s)rrZfeedclosegetrrZUnsupportedPythonVersionZ project_namer r r rrrZInvalidSpecifierloggerZwarning)rZmetadataZ feed_parserZ pkg_info_dictrerrrcheck_dist_requires_python-s"  $r)Z __future__rZ email.parserrZloggingrZpip._vendor.packagingrrZ pip._vendorrZpiprZ getLogger__name__rrrrrrrrs       PKČe[H !__pycache__/hashes.cpython-36.pycnu[3 Pf2 @szddlmZddlZddlmZmZmZddlmZddl m Z m Z m Z dZ dddgZGd d d eZGd d d eZdS) )absolute_importN) HashMismatch HashMissingInstallationError) read_chunks) iteritemsiterkeys itervaluesZsha256Zsha384Zsha512c@sJeZdZdZdddZddZddZd d Zd d Zd dZ ddZ dS)HasheszaA wrapper that builds multiple hashes at once and checks them against known-good values NcCs|dkr in||_dS)zo :param hashes: A dict of algorithm names pointing to lists of allowed hex digests N)_allowed)selfhashesr/usr/lib/python3.6/hashes.py__init__szHashes.__init__c Csi}xJt|jD]<}ytj|||<Wqttfk rJtd|YqXqWx(|D] }xt|D]}|j|qdWqVWx*t |D]\}}|j |j|krdSqW|j |dS)zCheck good hashes against ones built from iterable of chunks of data. Raise HashMismatch if none match. zUnknown hash name: %sN) rr hashlibnew ValueError TypeErrorrr updater hexdigest_raise)r ZchunksgotsZ hash_namechunkhashZgotrrrcheck_against_chunks s zHashes.check_against_chunkscCst|j|dS)N)rr )r rrrrr7sz Hashes._raisecCs|jt|S)zaCheck good hashes against a file-like object Raise HashMismatch if none match. )rr)r filerrrcheck_against_file:szHashes.check_against_filec Cs t|d }|j|SQRXdS)Nrb)openr)r pathrrrrcheck_against_pathBs zHashes.check_against_pathcCs t|jS)z,Return whether I know any known-good hashes.)boolr )r rrr __nonzero__FszHashes.__nonzero__cCs|jS)N)r#)r rrr__bool__JszHashes.__bool__)N) __name__ __module__ __qualname____doc__rrrrr!r#r$rrrrr s r cs(eZdZdZfddZddZZS) MissingHasheszA workalike for Hashes used when we're missing a hash for a requirement It computes the actual hash of the requirement and raises a HashMissing exception showing it to the user. cstt|jtgiddS)z!Don't offer the ``hashes`` kwarg.)r N)superr)r FAVORITE_HASH)r ) __class__rrrUszMissingHashes.__init__cCst|tjdS)N)rr+r)r rrrrr[szMissingHashes._raise)r%r&r'r(rr __classcell__rr)r,rr)Ns r))Z __future__rrZpip.exceptionsrrrZ pip.utilsrZpip._vendor.sixrrr r+Z STRONG_HASHESobjectr r)rrrrs   :PKČe[T44+__pycache__/setuptools_build.cpython-36.pycnu[3 Pf@sdZdS)zimport setuptools, tokenize;__file__=%r;f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))N)ZSETUPTOOLS_SHIMrr&/usr/lib/python3.6/setuptools_build.pysPKČe[& Z*__pycache__/packaging.cpython-36.opt-1.pycnu[3 Pf @s~ddlmZddlmZddlZddlZddlmZddlmZddl m Z ddl m Z ej eZdd Zd d Zd d ZdS))absolute_import) FeedParserN) specifiers)version) pkg_resources) exceptionscCs>|dkr dStj|}tjdjtttjdd}||kS)aG Check if the python version in use match the `requires_python` specifier. Returns `True` if the version of python in use matches the requirement. Returns `False` if the version of python in use does not matches the requirement. Raises an InvalidSpecifier if `requires_python` have an invalid format. NT.) rZ SpecifierSetrparsejoinmapstrsys version_info)requires_pythonZrequires_python_specifierZpython_versionr/usr/lib/python3.6/packaging.pycheck_requires_pythons   rcCs8t|tjr |jdr |jdS|jdr4|jdSdS)NZMETADATAzPKG-INFO) isinstancerZDistInfoDistributionZ has_metadata get_metadata)distrrrr%s     rcCst|}t}|j||j}|jd}y8t|s`tjd|j|dj t t t j ddfWn8tjk r}ztjd|j||fdSd}~XnXdS)NzRequires-Pythonz4%s requires Python '%s' but the running Python is %srr z7Package %s has an invalid Requires-Python entry %s - %s)rrZfeedclosegetrrZUnsupportedPythonVersionZ project_namer r r rrrZInvalidSpecifierloggerZwarning)rZmetadataZ feed_parserZ pkg_info_dictrerrrcheck_dist_requires_python-s"  $r)Z __future__rZ email.parserrZloggingrZpip._vendor.packagingrrZ pip._vendorrZpiprZ getLogger__name__rrrrrrrrs       PKČe[T441__pycache__/setuptools_build.cpython-36.opt-1.pycnu[3 Pf@sdZdS)zimport setuptools, tokenize;__file__=%r;f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))N)ZSETUPTOOLS_SHIMrr&/usr/lib/python3.6/setuptools_build.pysPKČe[UtFCC __pycache__/glibc.cpython-36.pycnu[3 Pf{ @sPddlmZddlZddlZddlZddlZddZddZddZd d Z dS) )absolute_importNc CsPtjd}y |j}Wntk r(dSXtj|_|}t|tsL|jd}|S)z9Returns glibc version string, or None if not using glibc.Nascii) ctypesZCDLLgnu_get_libc_versionAttributeErrorZc_char_pZrestype isinstancestrdecode)Zprocess_namespacer version_strr /usr/lib/python3.6/glibc.pyglibc_version_string s    r cCsHtjd|}|s$tjd|tdSt|jd|koFt|jd|kS)Nz$(?P[0-9]+)\.(?P[0-9]+)z=Expected glibc version with 2 components major.minor, got: %sFmajorminor)rematchwarningswarnRuntimeWarningintgroup)r required_major minimum_minormr r r check_glibc_version#s  rcCst}|dkrdSt|||S)NF)r r)rrr r r r have_compatible_glibc3srcCs"t}|dkrtjSd|fSdS)NZglibc)r platformlibc_ver)Z glibc_versionr r r rKsr) Z __future__rrrrrr rrrr r r r s PKČe[2e"__pycache__/appdirs.cpython-36.pycnu[3 Pfk" @sdZddlmZddlZddlZddlmZmZddlm Z m Z ddZ dd d Z dd d Z ddZddZddZeryddlZeZWnek reZYnXddZdS)zd This code was taken from https://github.com/ActiveState/appdirs and modified to suit our purposes. )absolute_importN)WINDOWS expanduser)PY2 text_typecCstr Unix: ~/.cache/ (XDG default) Windows: C:\Users\\AppData\Local\\Cache On Windows the only suggestion in the MSDN docs is that local settings go in the `CSIDL_LOCAL_APPDATA` directory. This is identical to the non-roaming app data dir (the default returned by `user_data_dir`). Apps typically put cache data somewhere *under* the given dir here. Some examples: ...\Mozilla\Firefox\Profiles\\Cache ...\Acme\SuperApp\Cache\1.0 OPINION: This function appends "Cache" to the `CSIDL_LOCAL_APPDATA` value. CSIDL_LOCAL_APPDATAZCachedarwinz~/Library/CachesZXDG_CACHE_HOMEz~/.cache)rospathnormpath_get_win_folderr isinstancer_win_path_to_bytesjoinsysplatformrgetenv)appnamer r/usr/lib/python3.6/appdirs.pyuser_cache_dirs rFcCshtr,|r dpd}tjjtjjt||}n8tjdkrJtjjtd|}ntjjtj dtd|}|S)aS Return full path to the user-specific data dir for this application. "appname" is the name of application. If None, just the system directory is returned. "roaming" (boolean, default False) can be set True to use the Windows roaming appdata directory. That means that for users on a Windows network setup for roaming profiles, this user data will be sync'd on login. See for a discussion of issues. Typical user data directories are: macOS: ~/Library/Application Support/ Unix: ~/.local/share/ # or in $XDG_DATA_HOME, if defined Win XP (not roaming): C:\Documents and Settings\\ ... ...Application Data\ Win XP (roaming): C:\Documents and Settings\\Local ... ...Settings\Application Data\ Win 7 (not roaming): C:\Users\\AppData\Local\ Win 7 (roaming): C:\Users\\AppData\Roaming\ For Unix, we follow the XDG spec and support $XDG_DATA_HOME. That means, by default "~/.local/share/". CSIDL_APPDATArrz~/Library/Application Support/Z XDG_DATA_HOMEz~/.local/share) rr r rr r rrrr)rroamingconstr rrr user_data_dir>s  rTcCsHtrt||d}n2tjdkr&t|}ntjdtd}tjj||}|S)arReturn full path to the user-specific config dir for this application. "appname" is the name of application. If None, just the system directory is returned. "roaming" (boolean, default True) can be set False to not use the Windows roaming appdata directory. That means that for users on a Windows network setup for roaming profiles, this user data will be sync'd on login. See for a discussion of issues. Typical user data directories are: macOS: same as user_data_dir Unix: ~/.config/ Win *: same as user_data_dir For Unix, we follow the XDG spec and support $XDG_CONFIG_HOME. That means, by default "~/.config/". )rrZXDG_CONFIG_HOMEz ~/.config) rrrrr rrr r)rrr rrruser_config_dirjs  rcstr&tjjtd}tjj|g}nVtjdkrBtjjdg}n:tjdd}|rnfdd|j tj D}ng}|j d|S) aReturn a list of potential user-shared config dirs for this application. "appname" is the name of application. Typical user config directories are: macOS: /Library/Application Support// Unix: /etc or $XDG_CONFIG_DIRS[i]// for each value in $XDG_CONFIG_DIRS Win XP: C:\Documents and Settings\All Users\Application ... ...Data\ Vista: (Fail! "C:\ProgramData" is a hidden *system* directory on Vista.) Win 7: Hidden, but writeable on Win 7: C:\ProgramData\ CSIDL_COMMON_APPDATArz/Library/Application SupportZXDG_CONFIG_DIRSz/etc/xdgcsg|]}tjjt|qSr)r r rr).0x)rrr sz$site_config_dirs..z/etc) rr r r r rrrrsplitpathsepappend)rr ZpathlistZxdg_config_dirsr)rrsite_config_dirss    r#cCs:ddl}dddd|}|j|jd}|j||\}}|S)z This is a fallback technique at best. I'm not sure if using the registry for this guarantees us the correct answer for all CSIDL_* names. rNZAppDatazCommon AppDataz Local AppData)rrrz@Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders)_winregOpenKeyHKEY_CURRENT_USERZ QueryValueEx) csidl_namer$Zshell_folder_namekeyZ directoryZ_typerrr_get_win_folder_from_registrysr)cCsdddd|}tjd}tjjjd|dd|d}x|D]}t|dkr:d }Pq:W|rztjd}tjjj|j|drz|}|jS) N#)rrrirFT) ctypesZcreate_unicode_bufferZwindllZshell32ZSHGetFolderPathWordZkernel32ZGetShortPathNameWvalue)r'Z csidl_constZbufZ has_high_charcZbuf2rrr_get_win_folder_with_ctypess     r2c Cs6x0dD](}y |j|Sttfk r,YqXqW|S)aEncode Windows paths to bytes. Only used on Python 2. Motivation is to be consistent with other operating systems where paths are also returned as bytes. This avoids problems mixing bytes and Unicode elsewhere in the codebase. For more details and discussion see . If encoding using ASCII and MBCS fails, return the original Unicode path. ASCIIMBCS)r3r4)encodeUnicodeEncodeError LookupError)r encodingrrrrs   r)F)T)__doc__Z __future__rr rZ pip.compatrrZpip._vendor.sixrrrrrr#r)r2r.r ImportErrorrrrrrs$ 0 , !( PKČe[2e(__pycache__/appdirs.cpython-36.opt-1.pycnu[3 Pfk" @sdZddlmZddlZddlZddlmZmZddlm Z m Z ddZ dd d Z dd d Z ddZddZddZeryddlZeZWnek reZYnXddZdS)zd This code was taken from https://github.com/ActiveState/appdirs and modified to suit our purposes. )absolute_importN)WINDOWS expanduser)PY2 text_typecCstr Unix: ~/.cache/ (XDG default) Windows: C:\Users\\AppData\Local\\Cache On Windows the only suggestion in the MSDN docs is that local settings go in the `CSIDL_LOCAL_APPDATA` directory. This is identical to the non-roaming app data dir (the default returned by `user_data_dir`). Apps typically put cache data somewhere *under* the given dir here. Some examples: ...\Mozilla\Firefox\Profiles\\Cache ...\Acme\SuperApp\Cache\1.0 OPINION: This function appends "Cache" to the `CSIDL_LOCAL_APPDATA` value. CSIDL_LOCAL_APPDATAZCachedarwinz~/Library/CachesZXDG_CACHE_HOMEz~/.cache)rospathnormpath_get_win_folderr isinstancer_win_path_to_bytesjoinsysplatformrgetenv)appnamer r/usr/lib/python3.6/appdirs.pyuser_cache_dirs rFcCshtr,|r dpd}tjjtjjt||}n8tjdkrJtjjtd|}ntjjtj dtd|}|S)aS Return full path to the user-specific data dir for this application. "appname" is the name of application. If None, just the system directory is returned. "roaming" (boolean, default False) can be set True to use the Windows roaming appdata directory. That means that for users on a Windows network setup for roaming profiles, this user data will be sync'd on login. See for a discussion of issues. Typical user data directories are: macOS: ~/Library/Application Support/ Unix: ~/.local/share/ # or in $XDG_DATA_HOME, if defined Win XP (not roaming): C:\Documents and Settings\\ ... ...Application Data\ Win XP (roaming): C:\Documents and Settings\\Local ... ...Settings\Application Data\ Win 7 (not roaming): C:\Users\\AppData\Local\ Win 7 (roaming): C:\Users\\AppData\Roaming\ For Unix, we follow the XDG spec and support $XDG_DATA_HOME. That means, by default "~/.local/share/". CSIDL_APPDATArrz~/Library/Application Support/Z XDG_DATA_HOMEz~/.local/share) rr r rr r rrrr)rroamingconstr rrr user_data_dir>s  rTcCsHtrt||d}n2tjdkr&t|}ntjdtd}tjj||}|S)arReturn full path to the user-specific config dir for this application. "appname" is the name of application. If None, just the system directory is returned. "roaming" (boolean, default True) can be set False to not use the Windows roaming appdata directory. That means that for users on a Windows network setup for roaming profiles, this user data will be sync'd on login. See for a discussion of issues. Typical user data directories are: macOS: same as user_data_dir Unix: ~/.config/ Win *: same as user_data_dir For Unix, we follow the XDG spec and support $XDG_CONFIG_HOME. That means, by default "~/.config/". )rrZXDG_CONFIG_HOMEz ~/.config) rrrrr rrr r)rrr rrruser_config_dirjs  rcstr&tjjtd}tjj|g}nVtjdkrBtjjdg}n:tjdd}|rnfdd|j tj D}ng}|j d|S) aReturn a list of potential user-shared config dirs for this application. "appname" is the name of application. Typical user config directories are: macOS: /Library/Application Support// Unix: /etc or $XDG_CONFIG_DIRS[i]// for each value in $XDG_CONFIG_DIRS Win XP: C:\Documents and Settings\All Users\Application ... ...Data\ Vista: (Fail! "C:\ProgramData" is a hidden *system* directory on Vista.) Win 7: Hidden, but writeable on Win 7: C:\ProgramData\ CSIDL_COMMON_APPDATArz/Library/Application SupportZXDG_CONFIG_DIRSz/etc/xdgcsg|]}tjjt|qSr)r r rr).0x)rrr sz$site_config_dirs..z/etc) rr r r r rrrrsplitpathsepappend)rr ZpathlistZxdg_config_dirsr)rrsite_config_dirss    r#cCs:ddl}dddd|}|j|jd}|j||\}}|S)z This is a fallback technique at best. I'm not sure if using the registry for this guarantees us the correct answer for all CSIDL_* names. rNZAppDatazCommon AppDataz Local AppData)rrrz@Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders)_winregOpenKeyHKEY_CURRENT_USERZ QueryValueEx) csidl_namer$Zshell_folder_namekeyZ directoryZ_typerrr_get_win_folder_from_registrysr)cCsdddd|}tjd}tjjjd|dd|d}x|D]}t|dkr:d }Pq:W|rztjd}tjjj|j|drz|}|jS) N#)rrrirFT) ctypesZcreate_unicode_bufferZwindllZshell32ZSHGetFolderPathWordZkernel32ZGetShortPathNameWvalue)r'Z csidl_constZbufZ has_high_charcZbuf2rrr_get_win_folder_with_ctypess     r2c Cs6x0dD](}y |j|Sttfk r,YqXqW|S)aEncode Windows paths to bytes. Only used on Python 2. Motivation is to be consistent with other operating systems where paths are also returned as bytes. This avoids problems mixing bytes and Unicode elsewhere in the codebase. For more details and discussion see . If encoding using ASCII and MBCS fails, return the original Unicode path. ASCIIMBCS)r3r4)encodeUnicodeEncodeError LookupError)r encodingrrrrs   r)F)T)__doc__Z __future__rr rZ pip.compatrrZpip._vendor.sixrrrrrr#r)r2r.r ImportErrorrrrrrs$ 0 , !( PKČe[j!%!%#__pycache__/ui.cpython-36.opt-1.pycnu[3 PfM-@sddlmZddlmZddlZddlZddlmZmZmZddlZddl Z ddl Z ddl m Z ddl mZddlmZddlmZdd lmZmZdd lmZmZmZdd lmZydd lmZWnek rdZYnXe jeZ d dZ!e!eeZ"Gddde#Z$Gddde#Z%Gddde#Z&Gddde&e$e%e"Z'Gddde&e$e%eeZ(e j)ddZ*Gddde#Z+Gddde#Z,Gdd d e#Z-e j)d!d"Z.dS)#)absolute_import)divisionN)signalSIGINTdefault_int_handler)WINDOWS) format_size)get_indentation)six)BarIncrementalBar) WritelnMixin HIDE_CURSOR SHOW_CURSOR)Spinner)coloramac Cst|jdd}|s|St|dtjt|dtjg}|tt|dg7}ytjj|j|Wntk rv|SX|SdS)NencodingZ empty_fillZfillphases)getattrfiler Z text_typelistjoinencodeUnicodeEncodeError)Z preferredZfallbackrZ charactersr/usr/lib/python3.6/ui.py_select_progress_classsrcs4eZdZdZfddZfddZddZZS)InterruptibleMixina Helper to ensure that self.finish() gets called on keyboard interrupt. This allows downloads to be interrupted without leaving temporary state (like hidden cursors) behind. This class is similar to the progress library's existing SigIntMixin helper, but as of version 1.2, that helper has the following problems: 1. It calls sys.exit(). 2. It discards the existing SIGINT handler completely. 3. It leaves its own handler in place even after an uninterrupted finish, which will have unexpected delayed effects if the user triggers an unrelated keyboard interrupt some time after a progress-displaying download has already completed, for example. cs4tt|j||tt|j|_|jdkr0t|_dS)z= Save the original SIGINT handler for later. N)superr__init__rr handle_sigintoriginal_handlerr)selfargskwargs) __class__rrrNs zInterruptibleMixin.__init__cstt|jtt|jdS)z Restore the original SIGINT handler after finishing. This should happen regardless of whether the progress display finishes normally, or gets interrupted. N)rrfinishrrr!)r")r%rrr&^szInterruptibleMixin.finishcCs|j|j||dS)z Call self.finish() before delegating to the original SIGINT handler. This handler should only be in place while the progress display is active. N)r&r!)r"Zsignumframerrrr hsz InterruptibleMixin.handle_sigint)__name__ __module__ __qualname____doc__rr&r __classcell__rr)r%rr<s  rcsJeZdZfddZeddZeddZeddZd d d ZZ S) DownloadProgressMixincs,tt|j||dtd|j|_dS)N )rr-rr message)r"r#r$)r%rrruszDownloadProgressMixin.__init__cCs t|jS)N)rindex)r"rrr downloadedysz DownloadProgressMixin.downloadedcCs |jdkrdStd|jdS)Ngz...z/s)Zavgr)r"rrrdownload_speed}s z$DownloadProgressMixin.download_speedcCs|jrd|jSdS)Nzeta %s)ZetaZeta_td)r"rrr pretty_etas z DownloadProgressMixin.pretty_etar3ccs*x|D]}|V|j|qW|jdS)N)nextr&)r"itnxrrriters zDownloadProgressMixin.iter)r3) r(r)r*rpropertyr2r4r6r;r,rr)r%rr-ss     r-cseZdZfddZZS) WindowsMixincs\trjrd_ttj||trXtrXtjj_fddj_fddj_ dS)NFcs jjjS)N)rwrappedisattyr)r"rrsz'WindowsMixin.__init__..cs jjjS)N)rr>flushr)r"rrr@s) rZ hide_cursorrr=rrZ AnsiToWin32rr?rA)r"r#r$)r%)r"rrs zWindowsMixin.__init__)r(r)r*rr,rr)r%rr=sr=c@seZdZejZdZdZdS)DownloadProgressBarz %(percent)d%%z0%(downloaded)s %(download_speed)s %(pretty_eta)sN)r(r)r*sysstdoutrr0suffixrrrrrBsrBc@s&eZdZejZdZddZddZdS)DownloadProgressSpinnerz!%(downloaded)s %(download_speed)scCs"t|dstj|j|_t|jS)N_phaser)hasattr itertoolscyclerrGr7)r"rrr next_phases z"DownloadProgressSpinner.next_phasecCsN|j|}|j}|j|}dj||r*dnd||r6dnd|g}|j|dS)Nr5r.)r0rKrErZwriteln)r"r0ZphaserElinerrrupdates    zDownloadProgressSpinner.updateN) r(r)r*rCrDrrErKrMrrrrrFsrFc csRtr dVnB|j s$tjtjkr,dVn"|jtz dVWd|jtXdS)N) rr?loggergetEffectiveLevelloggingINFOwriterr)rrrr hidden_cursors  rSc@s$eZdZddZddZddZdS) RateLimitercCs||_d|_dS)Nr)_min_update_interval_seconds _last_update)r"min_update_interval_secondsrrrrszRateLimiter.__init__cCstj}||j}||jkS)N)timerVrU)r"ZnowZdeltarrrreadys zRateLimiter.readycCstj|_dS)N)rXrV)r"rrrresetszRateLimiter.resetN)r(r)r*rrYrZrrrrrTsrTc@s.eZdZd ddZddZdd Zd d ZdS) InteractiveSpinnerN-\|/?cCs\||_|dkrtj}||_t||_d|_tj||_ |jj dt |jdd|_ dS)NFr.z ... r) _messagerCrD_filerT _rate_limiter _finishedrIrJ _spin_cyclerRr _width)r"r0rZ spin_charsrWrrrrs  zInteractiveSpinner.__init__cCsRd|j}|jj|d|j||jj|t||_|jj|jjdS)Nr.)rcr_rRlenrAr`rZ)r"statusZbackuprrr_write s     zInteractiveSpinner._writecCs,|jr dS|jjsdS|jt|jdS)N)rar`rYrgr7rb)r"rrrspins  zInteractiveSpinner.spincCs4|jr dS|j||jjd|jjd|_dS)N T)rargr_rRrA)r" final_statusrrrr&s    zInteractiveSpinner.finish)Nr\r])r(r)r*rrgrhr&rrrrr[s   r[c@s.eZdZd ddZddZddZdd Zd S) NonInteractiveSpinner<cCs$||_d|_t||_|jddS)NFZstarted)r^rarTr`_update)r"r0rWrrrr*s zNonInteractiveSpinner.__init__cCs|jjtjd|j|dS)Nz%s: %s)r`rZrNinfor^)r"rfrrrrm0s zNonInteractiveSpinner._updatecCs&|jr dS|jjsdS|jddS)Nzstill running...)rar`rYrm)r"rrrrh5s  zNonInteractiveSpinner.spincCs$|jr dS|jd|fd|_dS)Nzfinished with status '%s'T)rarm)r"rjrrrr&<szNonInteractiveSpinner.finishN)rl)r(r)r*rrmrhr&rrrrrk)s rkccstjjr"tjtjkr"t|}nt|}y t tj |VWdQRXWn>t k rj|j dYn*t k r|j dYn X|j ddS)NZcancelederrordone) rCrDr?rNrOrPrQr[rkrSKeyboardInterruptr& Exception)r0Zspinnerrrr open_spinnerCs    rs)/Z __future__rrrIrCrrrrX contextlibrPZ pip.compatrZ pip.utilsrZpip.utils.loggingr Z pip._vendorr Zpip._vendor.progress.barr r Zpip._vendor.progress.helpersr rrZpip._vendor.progress.spinnerrrrrZ getLoggerr(rNrZ_BaseBarobjectrr-r=rBrFcontextmanagerrSrTr[rkrsrrrrsB          7 !0PKČe[:gg)__pycache__/outdated.cpython-36.opt-1.pycnu[3 Pfe@sddlmZddlZddlZddlZddlZddlZddlm Z ddl m Z ddl mZmZddlmZddlmZmZddlmZmZdd lmZd ZejeZGd d d eZGd ddeZ ddZ!ddZ"ddZ#dS))absolute_importN)lockfile)version) total_secondsWINDOWS)PyPI)USER_CACHE_DIRrunning_under_virtualenv) ensure_dirget_installed_version)check_path_ownerz%Y-%m-%dT%H:%M:%SZc@seZdZddZddZdS)VirtualenvSelfCheckStatecCs\tjjtjd|_y&t|j}tj||_ WdQRXWnt t fk rVi|_ YnXdS)Nzpip-selfcheck.json) ospathjoinsysprefixstatefile_pathopenjsonloadstateIOError ValueError)self statefiler/usr/lib/python3.6/outdated.py__init__s  z!VirtualenvSelfCheckState.__init__c Cs:t|jd$}tj|jt|d|dddWdQRXdS)Nw) last_check pypi_versionT,:) sort_keys separators)r"r#)rrrdumpstrftimeSELFCHECK_DATE_FMT)rr! current_timerrrrsave$szVirtualenvSelfCheckState.saveN)__name__ __module__ __qualname__rr*rrrrr s r c@seZdZddZddZdS)GlobalSelfCheckStatecCsbtjjtd|_y,t|j}tj|tj |_ WdQRXWn t t t fk r\i|_ YnXdS)Nzselfcheck.json)rrrrrrrrrrrrrKeyError)rrrrrr3s   zGlobalSelfCheckState.__init__cCsttjj|jsdSttjj|jtj|jztjj|jrft |j}t j |}WdQRXni}|j t |d|tj<t |jd}t j||dddWdQRXWdQRXdS)N)r r!rTr"r#)r$r%)r"r#)r rrdirnamerr rZLockFileexistsrrrr'r(rrr&)rr!r)rrrrrr*=s  zGlobalSelfCheckState.saveN)r+r,r-rr*rrrrr.2s r.cCstr tStSdS)N)r r r.rrrrload_selfcheck_statefileXsr2c CsFddl}y"|jd}|jdo*d|jdkS|jk r@dSXdS)zChecks whether pip was installed by pip This is used not to display the upgrade message when pip is in fact installed by system package manager, such as dnf on Fedora. rNpipZ INSTALLERF) pkg_resourcesZget_distributionZ has_metadataZget_metadata_linesZDistributionNotFound)r4Zdistrrrpip_installed_by_pip_s  r5c CsFtd}|dkrdStj|}d}yt}tjj}d|jkrxd|jkrxtjj|jdt}t ||dkrx|jd}|dkr|j t j dd id }|j d d tt|jd tjdDd}|j||tj|}||kr|j|jkrtrtrd} nd} tjd||| Wn$tk r@tjdddYnXdS)zCheck for an update for pip. Limit the frequency of checks to once per week. State is stored either in the active virtualenv or in the user's USER_CACHE_DIR keyed off the prefix of the pip script path. r3Nr r!<ZAcceptzapplication/json)ZheaderscSsg|]}tj|js|qSr)packaging_versionparseZ is_prerelease).0vrrr sz%pip_version_check..Zreleases)keyz python -m pipzYou are using pip version %s, however version %s is available. You should consider upgrading via the '%s install --upgrade pip' command.z5There was an error checking the latest version of pipT)exc_infoi`'i: )r r9r:r2datetimeZutcnowrZstrptimer(rgetrZ pip_json_urlZraise_for_statussortedlistrr*Z base_versionr5rloggerZwarning Exceptiondebug) ZsessionZinstalled_versionZ pip_versionr!rr)r ZrespZremote_versionZpip_cmdrrrpip_version_checknsL        rJ)$Z __future__rrCrZloggingZos.pathrrZ pip._vendorrZpip._vendor.packagingrr9Z pip.compatrrZ pip.modelsrZ pip.locationsrr Z pip.utilsr r Zpip.utils.filesystemr r(Z getLoggerr+rGobjectr r.r2r5rJrrrrs&      &PKČe[b#-&__pycache__/deprecation.cpython-36.pycnu[3 Pf@sdZddlmZddlZddlZGdddeZGdddeZGdd d eZ Gd d d eeZ Gd d d eZ da dddZ ddZdS)zN A module that implements tooling to enable easy warnings about deprecations. )absolute_importNc@s eZdZdS)PipDeprecationWarningN)__name__ __module__ __qualname__rr!/usr/lib/python3.6/deprecation.pyr src@s eZdZdS)PendingN)rrrrrrrr sr c@s eZdZdS)RemovedInPip10WarningN)rrrrrrrr sr c@s eZdZdS)RemovedInPip11WarningN)rrrrrrrr sr c@s eZdZdS)Python26DeprecationWarningN)rrrrrrrr sr cCsx|dk r$tdk rtt||||||nPt|trbtjd}d|}t|trV|j|qt|j|nt||||||dS)Nzpip.deprecationszDEPRECATION: %s)_warnings_showwarning issubclassrloggingZ getLoggerr Zwarningerror)messagecategoryfilenamelinenofilelineZloggerZ log_messagerrr _showwarning$s     rcCs(tjdtddtdkr$tjatt_dS)NdefaultT)append)warnings simplefilterrr showwarningrrrrrinstall_warning_loggerDsr)NN)__doc__Z __future__rrrWarningrobjectr r r r r rrrrrrs  PKČe[g&x logging.pynu[from __future__ import absolute_import import contextlib import logging import logging.handlers import os try: import threading except ImportError: import dummy_threading as threading from pip.compat import WINDOWS from pip.utils import ensure_dir try: from pip._vendor import colorama # Lots of different errors can come from this, including SystemError and # ImportError. except Exception: colorama = None _log_state = threading.local() _log_state.indentation = 0 @contextlib.contextmanager def indent_log(num=2): """ A context manager which will cause the log output to be indented for any log messages emitted inside it. """ _log_state.indentation += num try: yield finally: _log_state.indentation -= num def get_indentation(): return getattr(_log_state, 'indentation', 0) class IndentingFormatter(logging.Formatter): def format(self, record): """ Calls the standard formatter, but will indent all of the log messages by our current indentation level. """ formatted = logging.Formatter.format(self, record) formatted = "".join([ (" " * get_indentation()) + line for line in formatted.splitlines(True) ]) return formatted def _color_wrap(*colors): def wrapped(inp): return "".join(list(colors) + [inp, colorama.Style.RESET_ALL]) return wrapped class ColorizedStreamHandler(logging.StreamHandler): # Don't build up a list of colors if we don't have colorama if colorama: COLORS = [ # This needs to be in order from highest logging level to lowest. (logging.ERROR, _color_wrap(colorama.Fore.RED)), (logging.WARNING, _color_wrap(colorama.Fore.YELLOW)), ] else: COLORS = [] def __init__(self, stream=None): logging.StreamHandler.__init__(self, stream) if WINDOWS and colorama: self.stream = colorama.AnsiToWin32(self.stream) def should_color(self): # Don't colorize things if we do not have colorama if not colorama: return False real_stream = ( self.stream if not isinstance(self.stream, colorama.AnsiToWin32) else self.stream.wrapped ) # If the stream is a tty we should color it if hasattr(real_stream, "isatty") and real_stream.isatty(): return True # If we have an ASNI term we should color it if os.environ.get("TERM") == "ANSI": return True # If anything else we should not color it return False def format(self, record): msg = logging.StreamHandler.format(self, record) if self.should_color(): for level, color in self.COLORS: if record.levelno >= level: msg = color(msg) break return msg class BetterRotatingFileHandler(logging.handlers.RotatingFileHandler): def _open(self): ensure_dir(os.path.dirname(self.baseFilename)) return logging.handlers.RotatingFileHandler._open(self) class MaxLevelFilter(logging.Filter): def __init__(self, level): self.level = level def filter(self, record): return record.levelno < self.level PKČe[Jsetuptools_build.pynu[# Shim to wrap setup.py invocation with setuptools SETUPTOOLS_SHIM = ( "import setuptools, tokenize;__file__=%r;" "f=getattr(tokenize, 'open', open)(__file__);" "code=f.read().replace('\\r\\n', '\\n');" "f.close();" "exec(compile(code, __file__, 'exec'))" ) PKČe[Z3j3j __init__.pynu[from __future__ import absolute_import from collections import deque import contextlib import errno import io import locale # we have a submodule named 'logging' which would shadow this if we used the # regular name: import logging as std_logging import re import os import posixpath import shutil import stat import subprocess import sys import tarfile import zipfile from pip.exceptions import InstallationError from pip.compat import console_to_str, expanduser, stdlib_pkgs from pip.locations import ( site_packages, user_site, running_under_virtualenv, virtualenv_no_global, write_delete_marker_file, ) from pip._vendor import pkg_resources from pip._vendor.six.moves import input from pip._vendor.six import PY2 from pip._vendor.retrying import retry if PY2: from io import BytesIO as StringIO else: from io import StringIO __all__ = ['rmtree', 'display_path', 'backup_dir', 'ask', 'splitext', 'format_size', 'is_installable_dir', 'is_svn_page', 'file_contents', 'split_leading_dir', 'has_leading_dir', 'normalize_path', 'renames', 'get_terminal_size', 'get_prog', 'unzip_file', 'untar_file', 'unpack_file', 'call_subprocess', 'captured_stdout', 'ensure_dir', 'ARCHIVE_EXTENSIONS', 'SUPPORTED_EXTENSIONS', 'get_installed_version'] logger = std_logging.getLogger(__name__) BZ2_EXTENSIONS = ('.tar.bz2', '.tbz') XZ_EXTENSIONS = ('.tar.xz', '.txz', '.tlz', '.tar.lz', '.tar.lzma') ZIP_EXTENSIONS = ('.zip', '.whl') TAR_EXTENSIONS = ('.tar.gz', '.tgz', '.tar') ARCHIVE_EXTENSIONS = ( ZIP_EXTENSIONS + BZ2_EXTENSIONS + TAR_EXTENSIONS + XZ_EXTENSIONS) SUPPORTED_EXTENSIONS = ZIP_EXTENSIONS + TAR_EXTENSIONS try: import bz2 # noqa SUPPORTED_EXTENSIONS += BZ2_EXTENSIONS except ImportError: logger.debug('bz2 module is not available') try: # Only for Python 3.3+ import lzma # noqa SUPPORTED_EXTENSIONS += XZ_EXTENSIONS except ImportError: logger.debug('lzma module is not available') def import_or_raise(pkg_or_module_string, ExceptionType, *args, **kwargs): try: return __import__(pkg_or_module_string) except ImportError: raise ExceptionType(*args, **kwargs) def ensure_dir(path): """os.path.makedirs without EEXIST.""" try: os.makedirs(path) except OSError as e: if e.errno != errno.EEXIST: raise def get_prog(): try: if os.path.basename(sys.argv[0]) in ('__main__.py', '-c'): return "%s -m pip" % sys.executable except (AttributeError, TypeError, IndexError): pass return 'pip' # Retry every half second for up to 3 seconds @retry(stop_max_delay=3000, wait_fixed=500) def rmtree(dir, ignore_errors=False): shutil.rmtree(dir, ignore_errors=ignore_errors, onerror=rmtree_errorhandler) def rmtree_errorhandler(func, path, exc_info): """On Windows, the files in .svn are read-only, so when rmtree() tries to remove them, an exception is thrown. We catch that here, remove the read-only attribute, and hopefully continue without problems.""" # if file type currently read only if os.stat(path).st_mode & stat.S_IREAD: # convert to read/write os.chmod(path, stat.S_IWRITE) # use the original function to repeat the operation func(path) return else: raise def display_path(path): """Gives the display value for a given path, making it relative to cwd if possible.""" path = os.path.normcase(os.path.abspath(path)) if sys.version_info[0] == 2: path = path.decode(sys.getfilesystemencoding(), 'replace') path = path.encode(sys.getdefaultencoding(), 'replace') if path.startswith(os.getcwd() + os.path.sep): path = '.' + path[len(os.getcwd()):] return path def backup_dir(dir, ext='.bak'): """Figure out the name of a directory to back up the given dir to (adding .bak, .bak2, etc)""" n = 1 extension = ext while os.path.exists(dir + extension): n += 1 extension = ext + str(n) return dir + extension def ask_path_exists(message, options): for action in os.environ.get('PIP_EXISTS_ACTION', '').split(): if action in options: return action return ask(message, options) def ask(message, options): """Ask the message interactively, with the given possible responses""" while 1: if os.environ.get('PIP_NO_INPUT'): raise Exception( 'No input was expected ($PIP_NO_INPUT set); question: %s' % message ) response = input(message) response = response.strip().lower() if response not in options: print( 'Your response (%r) was not one of the expected responses: ' '%s' % (response, ', '.join(options)) ) else: return response def format_size(bytes): if bytes > 1000 * 1000: return '%.1fMB' % (bytes / 1000.0 / 1000) elif bytes > 10 * 1000: return '%ikB' % (bytes / 1000) elif bytes > 1000: return '%.1fkB' % (bytes / 1000.0) else: return '%ibytes' % bytes def is_installable_dir(path): """Return True if `path` is a directory containing a setup.py file.""" if not os.path.isdir(path): return False setup_py = os.path.join(path, 'setup.py') if os.path.isfile(setup_py): return True return False def is_svn_page(html): """ Returns true if the page appears to be the index page of an svn repository """ return (re.search(r'[^<]*Revision \d+:', html) and re.search(r'Powered by (?:<a[^>]*?>)?Subversion', html, re.I)) def file_contents(filename): with open(filename, 'rb') as fp: return fp.read().decode('utf-8') def read_chunks(file, size=io.DEFAULT_BUFFER_SIZE): """Yield pieces of data from a file-like object until EOF.""" while True: chunk = file.read(size) if not chunk: break yield chunk def split_leading_dir(path): path = path.lstrip('/').lstrip('\\') if '/' in path and (('\\' in path and path.find('/') < path.find('\\')) or '\\' not in path): return path.split('/', 1) elif '\\' in path: return path.split('\\', 1) else: return path, '' def has_leading_dir(paths): """Returns true if all the paths have the same leading path name (i.e., everything is in one subdirectory in an archive)""" common_prefix = None for path in paths: prefix, rest = split_leading_dir(path) if not prefix: return False elif common_prefix is None: common_prefix = prefix elif prefix != common_prefix: return False return True def normalize_path(path, resolve_symlinks=True): """ Convert a path to its canonical, case-normalized, absolute version. """ path = expanduser(path) if resolve_symlinks: path = os.path.realpath(path) else: path = os.path.abspath(path) return os.path.normcase(path) def splitext(path): """Like os.path.splitext, but take off .tar too""" base, ext = posixpath.splitext(path) if base.lower().endswith('.tar'): ext = base[-4:] + ext base = base[:-4] return base, ext def renames(old, new): """Like os.renames(), but handles renaming across devices.""" # Implementation borrowed from os.renames(). head, tail = os.path.split(new) if head and tail and not os.path.exists(head): os.makedirs(head) shutil.move(old, new) head, tail = os.path.split(old) if head and tail: try: os.removedirs(head) except OSError: pass def is_local(path): """ Return True if path is within sys.prefix, if we're running in a virtualenv. If we're not in a virtualenv, all paths are considered "local." """ if not running_under_virtualenv(): return True return normalize_path(path).startswith(normalize_path(sys.prefix)) def dist_is_local(dist): """ Return True if given Distribution object is installed locally (i.e. within current virtualenv). Always True if we're not in a virtualenv. """ return is_local(dist_location(dist)) def dist_in_usersite(dist): """ Return True if given Distribution is installed in user site. """ norm_path = normalize_path(dist_location(dist)) return norm_path.startswith(normalize_path(user_site)) def dist_in_site_packages(dist): """ Return True if given Distribution is installed in distutils.sysconfig.get_python_lib(). """ return normalize_path( dist_location(dist) ).startswith(normalize_path(site_packages)) def dist_is_editable(dist): """Is distribution an editable install?""" for path_item in sys.path: egg_link = os.path.join(path_item, dist.project_name + '.egg-link') if os.path.isfile(egg_link): return True return False def get_installed_distributions(local_only=True, skip=stdlib_pkgs, include_editables=True, editables_only=False, user_only=False): """ Return a list of installed Distribution objects. If ``local_only`` is True (default), only return installations local to the current virtualenv, if in a virtualenv. ``skip`` argument is an iterable of lower-case project names to ignore; defaults to stdlib_pkgs If ``editables`` is False, don't report editables. If ``editables_only`` is True , only report editables. If ``user_only`` is True , only report installations in the user site directory. """ if local_only: local_test = dist_is_local else: def local_test(d): return True if include_editables: def editable_test(d): return True else: def editable_test(d): return not dist_is_editable(d) if editables_only: def editables_only_test(d): return dist_is_editable(d) else: def editables_only_test(d): return True if user_only: user_test = dist_in_usersite else: def user_test(d): return True return [d for d in pkg_resources.working_set if local_test(d) and d.key not in skip and editable_test(d) and editables_only_test(d) and user_test(d) ] def egg_link_path(dist): """ Return the path for the .egg-link file if it exists, otherwise, None. There's 3 scenarios: 1) not in a virtualenv try to find in site.USER_SITE, then site_packages 2) in a no-global virtualenv try to find in site_packages 3) in a yes-global virtualenv try to find in site_packages, then site.USER_SITE (don't look in global location) For #1 and #3, there could be odd cases, where there's an egg-link in 2 locations. This method will just return the first one found. """ sites = [] if running_under_virtualenv(): if virtualenv_no_global(): sites.append(site_packages) else: sites.append(site_packages) if user_site: sites.append(user_site) else: if user_site: sites.append(user_site) sites.append(site_packages) for site in sites: egglink = os.path.join(site, dist.project_name) + '.egg-link' if os.path.isfile(egglink): return egglink def dist_location(dist): """ Get the site-packages location of this distribution. Generally this is dist.location, except in the case of develop-installed packages, where dist.location is the source code location, and we want to know where the egg-link file is. """ egg_link = egg_link_path(dist) if egg_link: return egg_link return dist.location def get_terminal_size(): """Returns a tuple (x, y) representing the width(x) and the height(x) in characters of the terminal window.""" def ioctl_GWINSZ(fd): try: import fcntl import termios import struct cr = struct.unpack( 'hh', fcntl.ioctl(fd, termios.TIOCGWINSZ, '1234') ) except: return None if cr == (0, 0): return None return cr cr = ioctl_GWINSZ(0) or ioctl_GWINSZ(1) or ioctl_GWINSZ(2) if not cr: try: fd = os.open(os.ctermid(), os.O_RDONLY) cr = ioctl_GWINSZ(fd) os.close(fd) except: pass if not cr: cr = (os.environ.get('LINES', 25), os.environ.get('COLUMNS', 80)) return int(cr[1]), int(cr[0]) def current_umask(): """Get the current umask which involves having to set it temporarily.""" mask = os.umask(0) os.umask(mask) return mask def unzip_file(filename, location, flatten=True): """ Unzip the file (with path `filename`) to the destination `location`. All files are written based on system defaults and umask (i.e. permissions are not preserved), except that regular file members with any execute permissions (user, group, or world) have "chmod +x" applied after being written. Note that for windows, any execute changes using os.chmod are no-ops per the python docs. """ ensure_dir(location) zipfp = open(filename, 'rb') try: zip = zipfile.ZipFile(zipfp, allowZip64=True) leading = has_leading_dir(zip.namelist()) and flatten for info in zip.infolist(): name = info.filename data = zip.read(name) fn = name if leading: fn = split_leading_dir(name)[1] fn = os.path.join(location, fn) dir = os.path.dirname(fn) if fn.endswith('/') or fn.endswith('\\'): # A directory ensure_dir(fn) else: ensure_dir(dir) fp = open(fn, 'wb') try: fp.write(data) finally: fp.close() mode = info.external_attr >> 16 # if mode and regular file and any execute permissions for # user/group/world? if mode and stat.S_ISREG(mode) and mode & 0o111: # make dest file have execute for user/group/world # (chmod +x) no-op on windows per python docs os.chmod(fn, (0o777 - current_umask() | 0o111)) finally: zipfp.close() def untar_file(filename, location): """ Untar the file (with path `filename`) to the destination `location`. All files are written based on system defaults and umask (i.e. permissions are not preserved), except that regular file members with any execute permissions (user, group, or world) have "chmod +x" applied after being written. Note that for windows, any execute changes using os.chmod are no-ops per the python docs. """ ensure_dir(location) if filename.lower().endswith('.gz') or filename.lower().endswith('.tgz'): mode = 'r:gz' elif filename.lower().endswith(BZ2_EXTENSIONS): mode = 'r:bz2' elif filename.lower().endswith(XZ_EXTENSIONS): mode = 'r:xz' elif filename.lower().endswith('.tar'): mode = 'r' else: logger.warning( 'Cannot determine compression type for file %s', filename, ) mode = 'r:*' tar = tarfile.open(filename, mode) try: # note: python<=2.5 doesn't seem to know about pax headers, filter them leading = has_leading_dir([ member.name for member in tar.getmembers() if member.name != 'pax_global_header' ]) for member in tar.getmembers(): fn = member.name if fn == 'pax_global_header': continue if leading: fn = split_leading_dir(fn)[1] path = os.path.join(location, fn) if member.isdir(): ensure_dir(path) elif member.issym(): try: tar._extract_member(member, path) except Exception as exc: # Some corrupt tar files seem to produce this # (specifically bad symlinks) logger.warning( 'In the tar file %s the member %s is invalid: %s', filename, member.name, exc, ) continue else: try: fp = tar.extractfile(member) except (KeyError, AttributeError) as exc: # Some corrupt tar files seem to produce this # (specifically bad symlinks) logger.warning( 'In the tar file %s the member %s is invalid: %s', filename, member.name, exc, ) continue ensure_dir(os.path.dirname(path)) with open(path, 'wb') as destfp: shutil.copyfileobj(fp, destfp) fp.close() # Update the timestamp (useful for cython compiled files) tar.utime(member, path) # member have any execute permissions for user/group/world? if member.mode & 0o111: # make dest file have execute for user/group/world # no-op on windows per python docs os.chmod(path, (0o777 - current_umask() | 0o111)) finally: tar.close() def unpack_file(filename, location, content_type, link): filename = os.path.realpath(filename) if (content_type == 'application/zip' or filename.lower().endswith(ZIP_EXTENSIONS) or zipfile.is_zipfile(filename)): unzip_file( filename, location, flatten=not filename.endswith('.whl') ) elif (content_type == 'application/x-gzip' or tarfile.is_tarfile(filename) or filename.lower().endswith( TAR_EXTENSIONS + BZ2_EXTENSIONS + XZ_EXTENSIONS)): untar_file(filename, location) elif (content_type and content_type.startswith('text/html') and is_svn_page(file_contents(filename))): # We don't really care about this from pip.vcs.subversion import Subversion Subversion('svn+' + link.url).unpack(location) else: # FIXME: handle? # FIXME: magic signatures? logger.critical( 'Cannot unpack file %s (downloaded from %s, content-type: %s); ' 'cannot detect archive format', filename, location, content_type, ) raise InstallationError( 'Cannot determine archive format of %s' % location ) def call_subprocess(cmd, show_stdout=True, cwd=None, on_returncode='raise', command_desc=None, extra_environ=None, spinner=None): # This function's handling of subprocess output is confusing and I # previously broke it terribly, so as penance I will write a long comment # explaining things. # # The obvious thing that affects output is the show_stdout= # kwarg. show_stdout=True means, let the subprocess write directly to our # stdout. Even though it is nominally the default, it is almost never used # inside pip (and should not be used in new code without a very good # reason); as of 2016-02-22 it is only used in a few places inside the VCS # wrapper code. Ideally we should get rid of it entirely, because it # creates a lot of complexity here for a rarely used feature. # # Most places in pip set show_stdout=False. What this means is: # - We connect the child stdout to a pipe, which we read. # - By default, we hide the output but show a spinner -- unless the # subprocess exits with an error, in which case we show the output. # - If the --verbose option was passed (= loglevel is DEBUG), then we show # the output unconditionally. (But in this case we don't want to show # the output a second time if it turns out that there was an error.) # # stderr is always merged with stdout (even if show_stdout=True). if show_stdout: stdout = None else: stdout = subprocess.PIPE if command_desc is None: cmd_parts = [] for part in cmd: if ' ' in part or '\n' in part or '"' in part or "'" in part: part = '"%s"' % part.replace('"', '\\"') cmd_parts.append(part) command_desc = ' '.join(cmd_parts) logger.debug("Running command %s", command_desc) env = os.environ.copy() if extra_environ: env.update(extra_environ) try: proc = subprocess.Popen( cmd, stderr=subprocess.STDOUT, stdin=None, stdout=stdout, cwd=cwd, env=env) except Exception as exc: logger.critical( "Error %s while executing command %s", exc, command_desc, ) raise if stdout is not None: all_output = [] while True: line = console_to_str(proc.stdout.readline()) if not line: break line = line.rstrip() all_output.append(line + '\n') if logger.getEffectiveLevel() <= std_logging.DEBUG: # Show the line immediately logger.debug(line) else: # Update the spinner if spinner is not None: spinner.spin() proc.wait() if spinner is not None: if proc.returncode: spinner.finish("error") else: spinner.finish("done") if proc.returncode: if on_returncode == 'raise': if (logger.getEffectiveLevel() > std_logging.DEBUG and not show_stdout): logger.info( 'Complete output from command %s:', command_desc, ) logger.info( ''.join(all_output) + '\n----------------------------------------' ) raise InstallationError( 'Command "%s" failed with error code %s in %s' % (command_desc, proc.returncode, cwd)) elif on_returncode == 'warn': logger.warning( 'Command "%s" had error code %s in %s', command_desc, proc.returncode, cwd, ) elif on_returncode == 'ignore': pass else: raise ValueError('Invalid value: on_returncode=%s' % repr(on_returncode)) if not show_stdout: return ''.join(all_output) def read_text_file(filename): """Return the contents of *filename*. Try to decode the file contents with utf-8, the preferred system encoding (e.g., cp1252 on some Windows machines), and latin1, in that order. Decoding a byte string with latin1 will never raise an error. In the worst case, the returned string will contain some garbage characters. """ with open(filename, 'rb') as fp: data = fp.read() encodings = ['utf-8', locale.getpreferredencoding(False), 'latin1'] for enc in encodings: try: data = data.decode(enc) except UnicodeDecodeError: continue break assert type(data) != bytes # Latin1 should have worked. return data def _make_build_dir(build_dir): os.makedirs(build_dir) write_delete_marker_file(build_dir) class FakeFile(object): """Wrap a list of lines in an object with readline() to make ConfigParser happy.""" def __init__(self, lines): self._gen = (l for l in lines) def readline(self): try: try: return next(self._gen) except NameError: return self._gen.next() except StopIteration: return '' def __iter__(self): return self._gen class StreamWrapper(StringIO): @classmethod def from_stream(cls, orig_stream): cls.orig_stream = orig_stream return cls() # compileall.compile_dir() needs stdout.encoding to print to stdout @property def encoding(self): return self.orig_stream.encoding @contextlib.contextmanager def captured_output(stream_name): """Return a context manager used by captured_stdout/stdin/stderr that temporarily replaces the sys stream *stream_name* with a StringIO. Taken from Lib/support/__init__.py in the CPython repo. """ orig_stdout = getattr(sys, stream_name) setattr(sys, stream_name, StreamWrapper.from_stream(orig_stdout)) try: yield getattr(sys, stream_name) finally: setattr(sys, stream_name, orig_stdout) def captured_stdout(): """Capture the output of sys.stdout: with captured_stdout() as stdout: print('hello') self.assertEqual(stdout.getvalue(), 'hello\n') Taken from Lib/support/__init__.py in the CPython repo. """ return captured_output('stdout') class cached_property(object): """A property that is only computed once per instance and then replaces itself with an ordinary attribute. Deleting the attribute resets the property. Source: https://github.com/bottlepy/bottle/blob/0.11.5/bottle.py#L175 """ def __init__(self, func): self.__doc__ = getattr(func, '__doc__') self.func = func def __get__(self, obj, cls): if obj is None: # We're being accessed from the class itself, not from an object return self value = obj.__dict__[self.func.__name__] = self.func(obj) return value def get_installed_version(dist_name, lookup_dirs=None): """Get the installed version of dist_name avoiding pkg_resources cache""" # Create a requirement that we'll look for inside of setuptools. req = pkg_resources.Requirement.parse(dist_name) # We want to avoid having this cached, so we need to construct a new # working set each time. if lookup_dirs is None: working_set = pkg_resources.WorkingSet() else: working_set = pkg_resources.WorkingSet(lookup_dirs) # Get the installed distribution from our working set dist = working_set.find(req) # Check to see if we got an installed distribution or not, if we did # we want to return it's version. return dist.version if dist else None def consume(iterator): """Consume an iterable at C speed.""" deque(iterator, maxlen=0) PK�����!f[\"��"�� ��glibc.pyonu�[�������� abc�����������@@��sh���d��d�l��m�Z�d��d�l�Z�d��d�l�Z�d��d�l�Z�d��d�l�Z�d���Z�d���Z�d���Z�d���Z �d�S(���i����(���t���absolute_importNc����������C@��sk���t��j�d��}��y �|��j�}�Wn�t�k �r0�d�SXt��j�|�_�|���}�t�|�t��sg�|�j �d��}�n��|�S(���s9���Returns glibc version string, or None if not using glibc.t���asciiN( ���t���ctypest���CDLLt���Nonet���gnu_get_libc_versiont���AttributeErrort���c_char_pt���restypet ���isinstancet���strt���decode(���t���process_namespaceR���t ���version_str(����(����s3���/usr/lib/python2.7/site-packages/pip/utils/glibc.pyt���glibc_version_string ���s����    c���������C@��sd���t��j�d�|���}�|�s0�t�j�d�|��t��t�St�|�j�d���|�k�oc�t�|�j�d���|�k�S(���Ns$���(?P<major>[0-9]+)\.(?P<minor>[0-9]+)s=���Expected glibc version with 2 components major.minor, got: %st���majort���minor(���t���ret���matcht���warningst���warnt���RuntimeWarningt���Falset���intt���group(���R ���t���required_majort ���minimum_minort���m(����(����s3���/usr/lib/python2.7/site-packages/pip/utils/glibc.pyt���check_glibc_version#���s����  c���������C@��s)���t����}�|�d��k�r�t�St�|�|��|��S(���N(���R���R���R���R���(���R���R���R ���(����(����s3���/usr/lib/python2.7/site-packages/pip/utils/glibc.pyt���have_compatible_glibc3���s����  c����������C@��s-���t����}��|��d��k�r�t�j���Sd�|��f�Sd��S(���Nt���glibc(���R���R���t���platformt���libc_ver(���t ���glibc_version(����(����s3���/usr/lib/python2.7/site-packages/pip/utils/glibc.pyR ���K���s����   ( ���t ���__future__R����R���R���R���R���R���R���R���R ���(����(����(����s3���/usr/lib/python2.7/site-packages/pip/utils/glibc.pyt���<module>���s���       PK�����!f[`" !��!�� ��appdirs.pycnu�[�������� abc�����������@@��s���d��Z��d�d�l�m�Z�d�d�l�Z�d�d�l�Z�d�d�l�m�Z�m�Z�d�d�l�m �Z �m �Z �d���Z �e �d��Z �e�d��Z�d ���Z�d ���Z�d ���Z�e�r�y�d�d�l�Z�e�Z�Wq�e�k �r�e�Z�q�Xn��d ���Z�d�S( ���sd��� This code was taken from https://github.com/ActiveState/appdirs and modified to suit our purposes. i����(���t���absolute_importN(���t���WINDOWSt ���expanduser(���t���PY2t ���text_typec���������C@��s���t��r]�t�j�j�t�d���}�t�rB�t�|�t��rB�t�|��}�n��t�j�j �|�|��d��}�n`�t �j �d�k�r�t �d��}�t�j�j �|�|���}�n-�t�j �d�t �d���}�t�j�j �|�|���}�|�S(���s5�� Return full path to the user-specific cache dir for this application. "appname" is the name of application. Typical user cache directories are: macOS: ~/Library/Caches/<AppName> Unix: ~/.cache/<AppName> (XDG default) Windows: C:\Users\<username>\AppData\Local\<AppName>\Cache On Windows the only suggestion in the MSDN docs is that local settings go in the `CSIDL_LOCAL_APPDATA` directory. This is identical to the non-roaming app data dir (the default returned by `user_data_dir`). Apps typically put cache data somewhere *under* the given dir here. Some examples: ...\Mozilla\Firefox\Profiles\<ProfileName>\Cache ...\Acme\SuperApp\Cache\1.0 OPINION: This function appends "Cache" to the `CSIDL_LOCAL_APPDATA` value. t���CSIDL_LOCAL_APPDATAt���Cachet���darwins���~/Library/Cachest���XDG_CACHE_HOMEs���~/.cache(���R���t���ost���patht���normpatht���_get_win_folderR���t ���isinstanceR���t���_win_path_to_bytest���joint���syst���platformR���t���getenv(���t���appnameR ���(����(����s5���/usr/lib/python2.7/site-packages/pip/utils/appdirs.pyt���user_cache_dir���s���� c���������C@��s���t��rB�|�r�d�p�d�}�t�j�j�t�j�j�t�|���|���}�nT�t�j�d�k�ro�t�j�j�t�d��|���}�n'�t�j�j�t�j �d�t�d���|���}�|�S(���sS�� Return full path to the user-specific data dir for this application. "appname" is the name of application. If None, just the system directory is returned. "roaming" (boolean, default False) can be set True to use the Windows roaming appdata directory. That means that for users on a Windows network setup for roaming profiles, this user data will be sync'd on login. See <http://technet.microsoft.com/en-us/library/cc766489(WS.10).aspx> for a discussion of issues. Typical user data directories are: macOS: ~/Library/Application Support/<AppName> Unix: ~/.local/share/<AppName> # or in $XDG_DATA_HOME, if defined Win XP (not roaming): C:\Documents and Settings\<username>\ ... ...Application Data\<AppName> Win XP (roaming): C:\Documents and Settings\<username>\Local ... ...Settings\Application Data\<AppName> Win 7 (not roaming): C:\Users\<username>\AppData\Local\<AppName> Win 7 (roaming): C:\Users\<username>\AppData\Roaming\<AppName> For Unix, we follow the XDG spec and support $XDG_DATA_HOME. That means, by default "~/.local/share/<AppName>". t ���CSIDL_APPDATAR���R���s���~/Library/Application Support/t ���XDG_DATA_HOMEs���~/.local/share( ���R���R ���R ���R���R ���R ���R���R���R���R���(���R���t���roamingt���constR ���(����(����s5���/usr/lib/python2.7/site-packages/pip/utils/appdirs.pyt ���user_data_dir>���s����*     c���������C@��sj���t��r�t�|��d�|�}�nK�t�j�d�k�r9�t�|���}�n-�t�j�d�t�d���}�t�j�j�|�|���}�|�S(���sr��Return full path to the user-specific config dir for this application. "appname" is the name of application. If None, just the system directory is returned. "roaming" (boolean, default True) can be set False to not use the Windows roaming appdata directory. That means that for users on a Windows network setup for roaming profiles, this user data will be sync'd on login. See <http://technet.microsoft.com/en-us/library/cc766489(WS.10).aspx> for a discussion of issues. Typical user data directories are: macOS: same as user_data_dir Unix: ~/.config/<AppName> Win *: same as user_data_dir For Unix, we follow the XDG spec and support $XDG_CONFIG_HOME. That means, by default "~/.config/<AppName>". R���R���t���XDG_CONFIG_HOMEs ���~/.config( ���R���R���R���R���R ���R���R���R ���R���(���R���R���R ���(����(����s5���/usr/lib/python2.7/site-packages/pip/utils/appdirs.pyt���user_config_dirj���s����c���������C@��s���t��r9�t�j�j�t�d���}�t�j�j�|�|���g�}�n�t�j�d�k�rc�t�j�j�d�|���g�}�nh�t�j�d�d��}�|�r�g��|�j �t�j ��D]!�}�t�j�j�t �|��|���^�q�}�n�g��}�|�j �d��|�S(���s��Return a list of potential user-shared config dirs for this application. "appname" is the name of application. Typical user config directories are: macOS: /Library/Application Support/<AppName>/ Unix: /etc or $XDG_CONFIG_DIRS[i]/<AppName>/ for each value in $XDG_CONFIG_DIRS Win XP: C:\Documents and Settings\All Users\Application ... ...Data\<AppName> Vista: (Fail! "C:\ProgramData" is a hidden *system* directory on Vista.) Win 7: Hidden, but writeable on Win 7: C:\ProgramData\<AppName> t���CSIDL_COMMON_APPDATAR���s���/Library/Application Supportt���XDG_CONFIG_DIRSs���/etc/xdgs���/etc( ���R���R ���R ���R ���R ���R���R���R���R���t���splitt���pathsepR���t���append(���R���R ���t���pathlistt���xdg_config_dirst���x(����(����s5���/usr/lib/python2.7/site-packages/pip/utils/appdirs.pyt���site_config_dirs���s����: c���������C@��s\���d�d�l��}�i�d�d�6d�d�6d�d�6|��}�|�j�|�j�d ��}�|�j�|�|��\�}�}�|�S( ���s��� This is a fallback technique at best. I'm not sure if using the registry for this guarantees us the correct answer for all CSIDL_* names. i����Nt���AppDataR���s���Common AppDataR���s ���Local AppDataR���s@���Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders(���t���_winregt���OpenKeyt���HKEY_CURRENT_USERt ���QueryValueEx(���t ���csidl_nameR&���t���shell_folder_namet���keyt ���directoryt���_type(����(����s5���/usr/lib/python2.7/site-packages/pip/utils/appdirs.pyt���_get_win_folder_from_registry���s����  c���������C@��s���i�d�d�6d�d�6d�d�6|��}�t��j�d��}�t��j�j�j�d��|�d��d�|��t�}�x*�|�D]"�}�t�|��d �k�rZ�t�}�PqZ�qZ�W|�r�t��j�d��}�t��j�j �j �|�j �|�d��r�|�}�q�n��|�j �S( ���Ni���R���i#���R���i���R���i���i����i���( ���t���ctypest���create_unicode_buffert���windllt���shell32t���SHGetFolderPathWt���Nonet���Falset���ordt���Truet���kernel32t���GetShortPathNameWt���value(���R*���t ���csidl_constt���buft ���has_high_chart���ct���buf2(����(����s5���/usr/lib/python2.7/site-packages/pip/utils/appdirs.pyt���_get_win_folder_with_ctypes���s"����  c���������C@��s@���x9�d�D]1�}�y�|��j��|��SWq�t�t�f�k �r7�q�Xq�W|��S(���s��Encode Windows paths to bytes. Only used on Python 2. Motivation is to be consistent with other operating systems where paths are also returned as bytes. This avoids problems mixing bytes and Unicode elsewhere in the codebase. For more details and discussion see <https://github.com/pypa/pip/issues/3463>. If encoding using ASCII and MBCS fails, return the original Unicode path. t���ASCIIt���MBCS(���RB���RC���(���t���encodet���UnicodeEncodeErrort ���LookupError(���R ���t���encoding(����(����s5���/usr/lib/python2.7/site-packages/pip/utils/appdirs.pyR������s ���� (���t���__doc__t ���__future__R����R ���R���t ���pip.compatR���R���t���pip._vendor.sixR���R���R���R6���R���R8���R���R$���R/���RA���R0���R ���t ���ImportErrorR���(����(����(����s5���/usr/lib/python2.7/site-packages/pip/utils/appdirs.pyt���<module>���s$���   0 , ! (      PK�����!f[8W���� ��build.pyonu�[�������� abc�����������@@��sR���d��d�l��m�Z�d��d�l�Z�d��d�l�Z�d��d�l�m�Z�d�e�f�d�����YZ�d�S(���i����(���t���absolute_importN(���t���rmtreet���BuildDirectoryc�����������B@��s;���e��Z�d�d�d���Z�d���Z�d���Z�d���Z�d���Z�RS(���c���������C@��sy���|�d��k�r!�|�d��k�r!�t�}�n��|�d��k�rc�t�j�j�t�j�d�d���}�|�d��k�rc�t�}�qc�n��|�|��_�|�|��_�d��S(���Nt���prefixs ���pip-build-( ���t���Nonet���Truet���ost���patht���realpatht���tempfilet���mkdtempt���namet���delete(���t���selfR ���R ���(����(����s3���/usr/lib/python2.7/site-packages/pip/utils/build.pyt���__init__ ���s����     c���������C@��s���d�j��|��j�j�|��j��S(���Ns ���<{} {!r}>(���t���formatt ���__class__t���__name__R ���(���R ���(����(����s3���/usr/lib/python2.7/site-packages/pip/utils/build.pyt���__repr__���s����c���������C@��s���|��j��S(���N(���R ���(���R ���(����(����s3���/usr/lib/python2.7/site-packages/pip/utils/build.pyt ���__enter__"���s����c���������C@��s���|��j����d��S(���N(���t���cleanup(���R ���t���exct���valuet���tb(����(����s3���/usr/lib/python2.7/site-packages/pip/utils/build.pyt���__exit__%���s����c���������C@��s���|��j��r�t�|��j��n��d��S(���N(���R ���R���R ���(���R ���(����(����s3���/usr/lib/python2.7/site-packages/pip/utils/build.pyR���(���s���� N(���R���t ���__module__R���R���R���R���R���R���(����(����(����s3���/usr/lib/python2.7/site-packages/pip/utils/build.pyR��� ���s ���   ( ���t ���__future__R����t���os.pathR���R ���t ���pip.utilsR���t���objectR���(����(����(����s3���/usr/lib/python2.7/site-packages/pip/utils/build.pyt���<module>���s���  PK�����!f[ILh0��0�� ��outdated.pyonu�[�������� abc�����������@@��s.��d��d�l��m�Z�d��d�l�Z�d��d�l�Z�d��d�l�Z�d��d�l�Z�d��d�l�Z�d��d�l�m �Z �d��d�l �m �Z �d��d�l �m�Z�m�Z�d��d�l�m�Z�d��d�l�m�Z�m�Z�d��d�l�m�Z�m�Z�d��d �l�m�Z�d �Z�e�j�e��Z�d �e�f�d �����YZ�d �e�f�d�����YZ �d���Z!�d���Z"�d���Z#�d�S(���i����(���t���absolute_importN(���t���lockfile(���t���version(���t ���total_secondst���WINDOWS(���t���PyPI(���t���USER_CACHE_DIRt���running_under_virtualenv(���t ���ensure_dirt���get_installed_version(���t���check_path_owners���%Y-%m-%dT%H:%M:%SZt���VirtualenvSelfCheckStatec�����������B@��s���e��Z�d����Z�d���Z�RS(���c���������C@��sp���t��j�j�t�j�d��|��_�y.�t�|��j���}�t�j�|��|��_ �Wd��QXWn �t �t �f�k �rk�i��|��_ �n�Xd��S(���Ns���pip-selfcheck.json( ���t���ost���patht���joint���syst���prefixt���statefile_patht���opent���jsont���loadt���statet���IOErrort ���ValueError(���t���selft ���statefile(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/outdated.pyt���__init__���s ����c������ ���C@��sR���t��|��j�d��:�}�t�j�i�|�j�t��d�6|�d�6|�d�t�d�d�Wd��QXd��S( ���Nt���wt ���last_checkt ���pypi_versiont ���sort_keyst ���separatorst���,t���:(���R ���R!���(���R���R���R���t���dumpt���strftimet���SELFCHECK_DATE_FMTt���True(���R���R���t ���current_timeR���(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/outdated.pyt���save$���s����(���t���__name__t ���__module__R���R'���(����(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/outdated.pyR ������s��� t���GlobalSelfCheckStatec�����������B@��s���e��Z�d����Z�d���Z�RS(���c���������C@��sw���t��j�j�t�d��|��_�y5�t�|��j�� �}�t�j�|��t�j �|��_ �Wd��QXWn#�t �t �t �f�k �rr�i��|��_ �n�Xd��S(���Ns���selfcheck.json(���R ���R ���R���R���R���R���R���R���R���R���R���R���R���t���KeyError(���R���R���(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/outdated.pyR���3���s ����#c���������C@��s���t��t�j�j�|��j���s�d��St�t�j�j�|��j���t�j�|��j���t�j�j�|��j��r�t �|��j���}�t �j �|��}�Wd��QXn�i��}�i�|�j �t ��d�6|�d�6|�t�j�<t �|��j�d��#�}�t �j�|�|�d�t�d�d�Wd��QXWd��QXd��S( ���NR���R���R���R���R���R ���R!���(���R ���R!���(���R ���R ���R ���t���dirnameR���R���R���t���LockFilet���existsR���R���R���R#���R$���R���R���R"���R%���(���R���R���R&���R���R���(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/outdated.pyR'���=���s����(���R(���R)���R���R'���(����(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/outdated.pyR*���2���s��� c�����������C@��s���t����r�t���St���Sd��S(���N(���R���R ���R*���(����(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/outdated.pyt���load_selfcheck_statefileX���s���� c����������C@��s]���d�d�l��}��y5�|��j�d��}�|�j�d��o?�d�|�j�d��k�SWn�|��j�k �rX�t�SXd�S(���s���Checks whether pip was installed by pip This is used not to display the upgrade message when pip is in fact installed by system package manager, such as dnf on Fedora. i����Nt���pipt ���INSTALLER(���t ���pkg_resourcest���get_distributiont ���has_metadatat���get_metadata_linest���DistributionNotFoundt���False(���R2���t���dist(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/outdated.pyt���pip_installed_by_pip_���s���� c��� ������C@��s��t��d��}�|�d�k�r�d�St�j�|��}�d�}�yyt���}�t�j�j���}�d�|�j�k�r�d�|�j�k�r�t�j�j�|�j�d�t ��}�t �|�|��d�k��r�|�j�d�}�q�n��|�d�k�rE|��j �t �j �d�i�d �d �6}�|�j���g��t�t�|�j���d ��d �t�j�D]�}�t�j�|��j�s |�^�q d �}�|�j�|�|��n��t�j�|��} �|�| �k��r|�j�| �j�k�rt���rt�rd�} �n�d�} �t�j�d�|�|�| ��n��Wn$�t�k �rt�j�d�d�t�n�Xd�S(���s���Check for an update for pip. Limit the frequency of checks to once per week. State is stored either in the active virtualenv or in the user's USER_CACHE_DIR keyed off the prefix of the pip script path. R0���NR���R���i���i���i<���t���headerss���application/jsont���Acceptt���releasest���keyis ���python -m pips���You are using pip version %s, however version %s is available. You should consider upgrading via the '%s install --upgrade pip' command.s5���There was an error checking the latest version of pipt���exc_infoi���i`'��i: �(���R ���t���Nonet���packaging_versiont���parseR/���t���datetimet���utcnowR���t���strptimeR$���R���t���getR���t ���pip_json_urlt���raise_for_statust���sortedt���listR���t ���is_prereleaseR'���t ���base_versionR9���R���t���loggert���warningt ���Exceptiont���debugR%���( ���t���sessiont���installed_versiont ���pip_versionR���R���R&���R���t���respt���vt���remote_versiont���pip_cmd(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/outdated.pyt���pip_version_checkn���sN����             ($���t ���__future__R����RB���R���t���loggingt���os.pathR ���R���t ���pip._vendorR���t���pip._vendor.packagingR���R@���t ���pip.compatR���R���t ���pip.modelsR���t ���pip.locationsR���R���t ���pip.utilsR���R ���t���pip.utils.filesystemR ���R$���t ���getLoggerR(���RL���t���objectR ���R*���R/���R9���RW���(����(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/outdated.pyt���<module>���s&���     &  PK�����!f[KHy��y�� ��hashes.pycnu�[�������� abc�����������@@��s���d��d�l��m�Z�d��d�l�Z�d��d�l�m�Z�m�Z�m�Z�d��d�l�m�Z�d��d�l �m �Z �m �Z �m �Z �d�Z �d�d�d�g�Z�d �e�f�d �����YZ�d �e�f�d �����YZ�d�S( ���i����(���t���absolute_importN(���t ���HashMismatcht ���HashMissingt���InstallationError(���t ���read_chunks(���t ���iteritemst���iterkeyst ���itervaluest���sha256t���sha384t���sha512t���Hashesc�����������B@��sP���e��Z�d��Z�d�d��Z�d���Z�d���Z�d���Z�d���Z�d���Z �d���Z �RS( ���sa���A wrapper that builds multiple hashes at once and checks them against known-good values c���������C@��s���|�d�k�r�i��n�|�|��_�d�S(���so��� :param hashes: A dict of algorithm names pointing to lists of allowed hex digests N(���t���Nonet���_allowed(���t���selft���hashes(����(����s4���/usr/lib/python2.7/site-packages/pip/utils/hashes.pyt���__init__���s����c���������C@��s���i��}�xX�t��|��j��D]G�}�y�t�j�|��|�|�<Wq�t�t�f�k �r\�t�d�|���q�Xq�Wx2�|�D]*�}�x!�t�|��D]�}�|�j�|��q{�Wqh�Wx7�t �|��D])�\�}�}�|�j ���|��j�|�k�r�d�Sq�W|��j �|��d�S(���s���Check good hashes against ones built from iterable of chunks of data. Raise HashMismatch if none match. s���Unknown hash name: %sN( ���R���R ���t���hashlibt���newt ���ValueErrort ���TypeErrorR���R���t���updateR���t ���hexdigestt���_raise(���R���t���chunkst���gotst ���hash_namet���chunkt���hasht���got(����(����s4���/usr/lib/python2.7/site-packages/pip/utils/hashes.pyt���check_against_chunks ���s���� c���������C@��s���t��|��j�|���d��S(���N(���R���R ���(���R���R���(����(����s4���/usr/lib/python2.7/site-packages/pip/utils/hashes.pyR���7���s����c���������C@��s���|��j��t�|���S(���sa���Check good hashes against a file-like object Raise HashMismatch if none match. (���R���R���(���R���t���file(����(����s4���/usr/lib/python2.7/site-packages/pip/utils/hashes.pyt���check_against_file:���s����c���������C@��s)���t��|�d���}�|��j�|��SWd��QXd��S(���Nt���rb(���t���openR ���(���R���t���pathR���(����(����s4���/usr/lib/python2.7/site-packages/pip/utils/hashes.pyt���check_against_pathB���s����c���������C@��s ���t��|��j��S(���s,���Return whether I know any known-good hashes.(���t���boolR ���(���R���(����(����s4���/usr/lib/python2.7/site-packages/pip/utils/hashes.pyt ���__nonzero__F���s����c���������C@��s ���|��j����S(���N(���R&���(���R���(����(����s4���/usr/lib/python2.7/site-packages/pip/utils/hashes.pyt���__bool__J���s����N( ���t���__name__t ���__module__t���__doc__R ���R���R���R���R ���R$���R&���R'���(����(����(����s4���/usr/lib/python2.7/site-packages/pip/utils/hashes.pyR ������s���      t ���MissingHashesc�����������B@��s ���e��Z�d��Z�d���Z�d���Z�RS(���s���A workalike for Hashes used when we're missing a hash for a requirement It computes the actual hash of the requirement and raises a HashMissing exception showing it to the user. c���������C@��s$���t��t�|���j�d�i�g��t�6�d�S(���s!���Don't offer the ``hashes`` kwarg.R���N(���t���superR+���R���t ���FAVORITE_HASH(���R���(����(����s4���/usr/lib/python2.7/site-packages/pip/utils/hashes.pyR���U���s����c���������C@��s���t��|�t�j�����d��S(���N(���R���R-���R���(���R���R���(����(����s4���/usr/lib/python2.7/site-packages/pip/utils/hashes.pyR���[���s����(���R(���R)���R*���R���R���(����(����(����s4���/usr/lib/python2.7/site-packages/pip/utils/hashes.pyR+���N���s��� (���t ���__future__R����R���t���pip.exceptionsR���R���R���t ���pip.utilsR���t���pip._vendor.sixR���R���R���R-���t ���STRONG_HASHESt���objectR ���R+���(����(����(����s4���/usr/lib/python2.7/site-packages/pip/utils/hashes.pyt���<module>���s��� :PK�����!f[Ɩ+Ml��Ml�� ��__init__.pycnu�[�������� abc�����������@@��s��d��d�l��m�Z�d��d�l�m�Z�d��d�l�Z�d��d�l�Z�d��d�l�Z�d��d�l�Z�d��d�l�Z �d��d�l �Z �d��d�l �Z �d��d�l �Z �d��d�l �Z �d��d�l�Z�d��d�l�Z�d��d�l�Z�d��d�l�Z�d��d�l�Z�d��d�l�m�Z�d��d�l�m�Z�m�Z�m�Z�d��d�l�m�Z�m�Z�m�Z�m�Z�m�Z�d��d�l�m �Z �d��d�l!�m"�Z"�d��d �l#�m$�Z$�d��d �l%�m&�Z&�e$�rud��d �l�m'�Z(�n�d��d �l�m(�Z(�d �d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d �d!�d"�d#�d$�g�Z)�e �j*�e+��Z,�df�Z-�dg�Z.�dh�Z/�di�Z0�e/�e-�e0�e.�Z1�e/�e0�Z2�y�d��d�l3�Z3�e2�e-�7Z2�Wn�e4�k �rPe,�j5�d1��n�Xy�d��d�l6�Z6�e2�e.�7Z2�Wn�e4�k �re,�j5�d2��n�Xd3���Z7�d4���Z8�d5���Z9�e&�d6�d7�d8�d9��e:�d:���Z;�d;���Z<�d<���Z=�d=�d>��Z>�d?���Z?�d@���Z@�dA���ZA�dB���ZB�dC���ZC�dD���ZD�e�jE�dE��ZF�dF���ZG�dG���ZH�eI�dH��ZJ�dI���ZK�dJ���ZL�dK���ZM�dL���ZN�dM���ZO�dN���ZP�dO���ZQ�eI�e�eI�e:�e:�dP��ZR�dQ���ZS�dR���ZT�dS���ZU�dT���ZV�eI�dU��ZW�dV���ZX�dW���ZY�eI�d�dX�d�d�d�dY��Z[�dZ���Z\�d[���Z]�d\�e^�f�d]�����YZ_�d^�e(�f�d_�����YZ`�e�ja�d`����Zb�da���Zc�db�e^�f�dc�����YZd�d�dd��Ze�de���Zf�d�S(j���i����(���t���absolute_import(���t���dequeN(���t���InstallationError(���t���console_to_strt ���expandusert ���stdlib_pkgs(���t ���site_packagest ���user_sitet���running_under_virtualenvt���virtualenv_no_globalt���write_delete_marker_file(���t ���pkg_resources(���t���input(���t���PY2(���t���retry(���t���BytesIO(���t���StringIOt���rmtreet ���display_patht ���backup_dirt���askt���splitextt ���format_sizet���is_installable_dirt ���is_svn_paget ���file_contentst���split_leading_dirt���has_leading_dirt���normalize_patht���renamest���get_terminal_sizet���get_progt ���unzip_filet ���untar_filet ���unpack_filet���call_subprocesst���captured_stdoutt ���ensure_dirt���ARCHIVE_EXTENSIONSt���SUPPORTED_EXTENSIONSt���get_installed_versions���.tar.bz2s���.tbzs���.tar.xzs���.txzs���.tlzs���.tar.lzs ���.tar.lzmas���.zips���.whls���.tar.gzs���.tgzs���.tars���bz2 module is not availables���lzma module is not availablec���������O@��s5���y�t��|���SWn �t�k �r0�|�|�|����n�Xd��S(���N(���t ���__import__t ���ImportError(���t���pkg_or_module_stringt ���ExceptionTypet���argst���kwargs(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyt���import_or_raiseI���s���� c���������C@��sC���y�t��j�|���Wn+�t�k �r>�}�|�j�t�j�k�r?���q?�n�Xd�S(���s ���os.path.makedirs without EEXIST.N(���t���ost���makedirst���OSErrort���errnot���EEXIST(���t���patht���e(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR%���P���s ����c�����������C@��sO���y.�t��j�j�t�j�d��d�k�r-�d�t�j�SWn�t�t�t�f�k �rJ�n�Xd�S(���Ni����s ���__main__.pys���-cs ���%s -m pipt���pip(���s ���__main__.pys���-c( ���R0���R5���t���basenamet���syst���argvt ���executablet���AttributeErrort ���TypeErrort ���IndexError(����(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR���Y���s ����t���stop_max_delayi ��t ���wait_fixedi��c���������C@��s���t��j�|��d�|�d�t�d��S(���Nt ���ignore_errorst���onerror(���t���shutilR���t���rmtree_errorhandler(���t���dirRA���(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR���c���s����c���������C@��sA���t��j�|��j�t�j�@r:�t��j�|�t�j��|��|��d�S��d�S(���s���On Windows, the files in .svn are read-only, so when rmtree() tries to remove them, an exception is thrown. We catch that here, remove the read-only attribute, and hopefully continue without problems.N(���R0���t���statt���st_modet���S_IREADt���chmodt���S_IWRITE(���t���funcR5���t���exc_info(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyRD���i���s ���� c���������C@��s���t��j�j�t��j�j�|����}��t�j�d�d�k�rd�|��j�t�j���d��}��|��j�t�j ���d��}��n��|��j �t��j ���t��j�j ��r�d�|��t �t��j ����}��n��|��S(���sT���Gives the display value for a given path, making it relative to cwd if possible.i����i���t���replacet���.(���R0���R5���t���normcaset���abspathR9���t ���version_infot���decodet���getfilesystemencodingt���encodet���getdefaultencodingt ���startswitht���getcwdt���sept���len(���R5���(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR���x���s����s���.bakc���������C@��sK���d�}�|�}�x4�t��j�j�|��|��rB�|�d�7}�|�t�|��}�q�W|��|�S(���s\���Figure out the name of a directory to back up the given dir to (adding .bak, .bak2, etc)i���(���R0���R5���t���existst���str(���RE���t���extt���nt ���extension(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR������s ���� c���������C@��sC���x3�t��j�j�d�d��j���D]�}�|�|�k�r�|�Sq�Wt�|��|��S(���Nt���PIP_EXISTS_ACTIONt����(���R0���t���environt���gett���splitR���(���t���messaget���optionst���action(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyt���ask_path_exists���s����" c���������C@��sy���xr�t��j�j�d��r(�t�d�|����n��t�|���}�|�j���j���}�|�|�k�rm�d�|�d�j�|��f�GHq�|�Sq�Wd�S(���s@���Ask the message interactively, with the given possible responsest ���PIP_NO_INPUTs7���No input was expected ($PIP_NO_INPUT set); question: %ss<���Your response (%r) was not one of the expected responses: %ss���, N(���R0���Ra���Rb���t ���ExceptionR ���t���stript���lowert���join(���Rd���Re���t���response(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR������s����   c���������C@��sX���|��d�k�r�d�|��d�d�S|��d �k�r4�d�|��d�S|��d�k�rL�d�|��d�Sd�|��Sd��S( ���Ni��s���%.1fMBg�����@@i ���s���%ikBs���%.1fkBs���%ibytesi@B�i'��(����(���t���bytes(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR������s����     c���������C@��sE���t��j�j�|���s�t�St��j�j�|��d��}�t��j�j�|��rA�t�St�S(���s@���Return True if `path` is a directory containing a setup.py file.s���setup.py(���R0���R5���t���isdirt���FalseRl���t���isfilet���True(���R5���t���setup_py(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR������s ����c���������C@��s(���t��j�d�|���o'�t��j�d�|��t��j��S(���sT��� Returns true if the page appears to be the index page of an svn repository s���<title>[^<]*Revision \d+:s#���Powered by (?:<a[^>]*?>)?Subversion(���t���ret���searcht���I(���t���html(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR������s����c���������C@��s/���t��|��d���}�|�j���j�d��SWd��QXd��S(���Nt���rbs���utf-8(���t���opent���readRR���(���t���filenamet���fp(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR������s����c���������c@��s/���x(�t��r*�|��j�|��}�|�s"�Pn��|�Vq�Wd�S(���s7���Yield pieces of data from a file-like object until EOF.N(���Rr���Rz���(���t���filet���sizet���chunk(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyt ���read_chunks���s ���� c���������C@��s���|��j��d��j��d��}��d�|��k�rj�d�|��k�rN�|��j�d��|��j�d��k��sZ�d�|��k�rj�|��j�d�d��Sd�|��k�r�|��j�d�d��S|��d�f�Sd��S(���Nt���/s���\i���R`���(���t���lstript���findRc���(���R5���(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR������s����6  c���������C@��s\���d�}�xO�|��D]G�}�t�|��\�}�}�|�s/�t�S|�d�k�rD�|�}�q �|�|�k�r �t�Sq �Wt�S(���sy���Returns true if all the paths have the same leading path name (i.e., everything is in one subdirectory in an archive)N(���t���NoneR���Rp���Rr���(���t���pathst ���common_prefixR5���t���prefixt���rest(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR������s����    c���������C@��sI���t��|���}��|�r'�t�j�j�|���}��n�t�j�j�|���}��t�j�j�|���S(���sN��� Convert a path to its canonical, case-normalized, absolute version. (���R���R0���R5���t���realpathRP���RO���(���R5���t���resolve_symlinks(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR������s ���� c���������C@��sO���t��j�|���\�}�}�|�j���j�d��rE�|�d�|�}�|�d� }�n��|�|�f�S(���s,���Like os.path.splitext, but take off .tar toos���.tari(���t ���posixpathR���Rk���t���endswith(���R5���t���baseR\���(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR������s ���� c���������C@��s���t��j�j�|��\�}�}�|�rG�|�rG�t��j�j�|�� rG�t��j�|��n��t�j�|��|��t��j�j�|���\�}�}�|�r�|�r�y�t��j�|��Wq�t�k �r�q�Xn��d�S(���s7���Like os.renames(), but handles renaming across devices.N( ���R0���R5���Rc���RZ���R1���RC���t���movet ���removedirsR2���(���t���oldt���newt���headt���tail(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR�����s����  c���������C@��s)���t����s �t�St�|���j�t�t�j���S(���s��� Return True if path is within sys.prefix, if we're running in a virtualenv. If we're not in a virtualenv, all paths are considered "local." (���R���Rr���R���RV���R9���R���(���R5���(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyt���is_local��s���� c���������C@��s���t��t�|����S(���s��� Return True if given Distribution object is installed locally (i.e. within current virtualenv). Always True if we're not in a virtualenv. (���R���t ���dist_location(���t���dist(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyt ���dist_is_local!��s����c���������C@��s%���t��t�|����}�|�j�t��t���S(���sF��� Return True if given Distribution is installed in user site. (���R���R���RV���R���(���R���t ���norm_path(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyt���dist_in_usersite,��s����c���������C@��s���t��t�|����j�t��t���S(���se��� Return True if given Distribution is installed in distutils.sysconfig.get_python_lib(). (���R���R���RV���R���(���R���(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyt���dist_in_site_packages4��s����c���������C@��sJ���xC�t��j�D]8�}�t�j�j�|�|��j�d��}�t�j�j�|��r �t�Sq �Wt�S(���s$���Is distribution an editable install?s ���.egg-link(���R9���R5���R0���Rl���t ���project_nameRq���Rr���Rp���(���R���t ���path_itemt���egg_link(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyt���dist_is_editable>��s ����c��� ������C@��s���|��r�t��}�n �d���}�|�r*�d���}�n �d���}�|�rE�d���}�n �d���}�|�r]�t�}�n �d���}�g��t�j�D]K�} �|�| ��rp�| �j�|�k�rp�|�| ��rp�|�| ��rp�|�| ��rp�| �^�qp�S(���s�� Return a list of installed Distribution objects. If ``local_only`` is True (default), only return installations local to the current virtualenv, if in a virtualenv. ``skip`` argument is an iterable of lower-case project names to ignore; defaults to stdlib_pkgs If ``editables`` is False, don't report editables. If ``editables_only`` is True , only report editables. If ``user_only`` is True , only report installations in the user site directory. c���������S@��s���t��S(���N(���Rr���(���t���d(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyt ���local_test`��s����c���������S@��s���t��S(���N(���Rr���(���R���(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyt ���editable_testd��s����c���������S@��s ���t��|��� S(���N(���R���(���R���(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR���g��s����c���������S@��s ���t��|���S(���N(���R���(���R���(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyt���editables_only_testk��s����c���������S@��s���t��S(���N(���Rr���(���R���(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR���n��s����c���������S@��s���t��S(���N(���Rr���(���R���(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyt ���user_testt��s����(���R���R���R ���t ���working_sett���key( ���t ���local_onlyt���skipt���include_editablest���editables_onlyt ���user_onlyR���R���R���R���R���(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyt���get_installed_distributionsG��s$����           c���������C@��s���g��}�t����rN�t���r(�|�j�t��qq�|�j�t��t�rq�|�j�t��qq�n#�t�rd�|�j�t��n��|�j�t��x@�|�D]8�}�t�j�j�|�|��j��d�}�t�j�j �|��rx�|�Sqx�Wd�S(���s�� Return the path for the .egg-link file if it exists, otherwise, None. There's 3 scenarios: 1) not in a virtualenv try to find in site.USER_SITE, then site_packages 2) in a no-global virtualenv try to find in site_packages 3) in a yes-global virtualenv try to find in site_packages, then site.USER_SITE (don't look in global location) For #1 and #3, there could be odd cases, where there's an egg-link in 2 locations. This method will just return the first one found. s ���.egg-linkN( ���R���R ���t���appendR���R���R0���R5���Rl���R���Rq���(���R���t���sitest���sitet���egglink(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyt ���egg_link_path��s����     c���������C@��s���t��|���}�|�r�|�S|��j�S(���s��� Get the site-packages location of this distribution. Generally this is dist.location, except in the case of develop-installed packages, where dist.location is the source code location, and we want to know where the egg-link file is. (���R���t���location(���R���R���(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR�����s���� c����������C@��s���d���}��|��d��p*�|��d��p*�|��d��}�|�sx�y8�t��j�t��j���t��j��}�|��|��}�t��j�|��Wqx�qx�Xn��|�s�t��j�j�d�d��t��j�j�d�d��f�}�n��t�|�d��t�|�d��f�S( ���sl���Returns a tuple (x, y) representing the width(x) and the height(x) in characters of the terminal window.c���������S@��sk���yL�d�d��l��}�d�d��l�}�d�d��l�}�|�j�d�|�j�|��|�j�d���}�Wn�d��SX|�d�k�rg�d��S|�S(���Ni����t���hht���1234(���i����i����(���t���fcntlt���termiost���structt���unpackt���ioctlt ���TIOCGWINSZR���(���t���fdR���R���R���t���cr(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyt ���ioctl_GWINSZ��s����    i����i���i���t���LINESi���t���COLUMNSiP���(���R0���Ry���t���ctermidt���O_RDONLYt���closeRa���Rb���t���int(���R���R���R���(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR�����s���� $ -c����������C@��s ���t��j�d��}��t��j�|���|��S(���sB���Get the current umask which involves having to set it temporarily.i����(���R0���t���umask(���t���mask(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyt ���current_umask��s���� c��� ������C@��s~��t��|��t�|��d��}�zSt�j�|�d�t�}�t�|�j����oF�|�}�x|�j���D]}�|�j�}�|�j �|��}�|�} �|�r�t �|��d�} �n��t �j �j �|�| ��} �t �j �j�| ��} �| �j�d��s�| �j�d��r�t��| ��qV�t��| ��t�| �d��} �z�| �j�|��Wd�| �j���|�j�d�?} �| �rft�j�| ��rf| �d �@rft �j�| �d �t���d �B�n��XqV�WWd�|�j���Xd�S( ���s�� Unzip the file (with path `filename`) to the destination `location`. All files are written based on system defaults and umask (i.e. permissions are not preserved), except that regular file members with any execute permissions (user, group, or world) have "chmod +x" applied after being written. Note that for windows, any execute changes using os.chmod are no-ops per the python docs. Rx���t ���allowZip64i���R���s���\t���wbNi���iI���i��(���R%���Ry���t���zipfilet���ZipFileRr���R���t���namelistt���infolistR{���Rz���R���R0���R5���Rl���t���dirnameR���t���writeR���t ���external_attrRF���t���S_ISREGRI���R���( ���R{���R���t���flattent���zipfpt���zipt���leadingt���infot���namet���datat���fnRE���R|���t���mode(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR �����s0����      'c��� ������C@��s��t��|��|��j���j�d��s4�|��j���j�d��r=�d�}�np�|��j���j�t��r[�d�}�nR�|��j���j�t��ry�d�}�n4�|��j���j�d��r�d�}�n�t�j�d�|���d �}�t�j�|��|��}�zt �g��|�j ���D]�}�|�j �d �k�r�|�j �^�q��}�x|�j ���D]}�|�j �}�|�d �k�r'qn��|�r@t �|��d �}�n��t �j�j�|�|��}�|�j���rnt��|��q|�j���ry�|�j�|�|��Wqt�k �r}�t�j�d �|��|�j �|��qqXqy�|�j�|��} �Wn5�t�t�f�k �r }�t�j�d �|��|�j �|��qn�Xt��t �j�j�|���t�|�d ���} �t�j�| �| ��Wd�QX| �j���|�j�|�|��|�j�d�@rt �j�|�d�t���d�B�qqWWd�|�j���Xd�S(���s�� Untar the file (with path `filename`) to the destination `location`. All files are written based on system defaults and umask (i.e. permissions are not preserved), except that regular file members with any execute permissions (user, group, or world) have "chmod +x" applied after being written. Note that for windows, any execute changes using os.chmod are no-ops per the python docs. s���.gzs���.tgzs���r:gzs���r:bz2s���r:xzs���.tart���rs-���Cannot determine compression type for file %ss���r:*t���pax_global_headeri���s/���In the tar file %s the member %s is invalid: %sR���NiI���i��(���R%���Rk���R���t���BZ2_EXTENSIONSt ���XZ_EXTENSIONSt���loggert���warningt���tarfileRy���R���t ���getmembersR���R���R0���R5���Rl���Ro���t���issymt���_extract_memberRi���t ���extractfilet���KeyErrorR<���R���RC���t ���copyfileobjR���t���utimeR���RI���R���( ���R{���R���R���t���tart���memberR���R���R5���t���excR|���t���destfp(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR!�����sb���� *     !        &c���������C@��s(��t��j�j�|���}��|�d�k�sB�|��j���j�t��sB�t�j�|���rb�t�|��|�d�|��j�d�� n�|�d�k�s�t �j �|���s�|��j���j�t �t �t ��r�t�|��|��nz�|�r�|�j�d��r�t�t�|����r�d�d�l�m�}�|�d�|�j��j�|��n&�t�j�d �|��|�|��t�d �|���d��S( ���Ns���application/zipR���s���.whls���application/x-gzips ���text/htmli����(���t ���Subversions���svn+sZ���Cannot unpack file %s (downloaded from %s, content-type: %s); cannot detect archive formats%���Cannot determine archive format of %s(���R0���R5���R���Rk���R���t���ZIP_EXTENSIONSR���t ���is_zipfileR ���R���t ���is_tarfilet���TAR_EXTENSIONSR���R���R!���RV���R���R���t���pip.vcs.subversionR���t���urlR���R���t���criticalR���(���R{���R���t ���content_typet���linkR���(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR"���O��s,����    t���raisec������ ���C@��s��|�r�d��}�n �t�j�}�|�d��k�r�g��}�xd�|��D]\�} �d�| �k�sg�d�| �k�sg�d�| �k�sg�d�| �k�r�d�| �j�d�d��} �n��|�j�| ��q1�Wd�j�|��}�n��t�j�d�|��t�j �j ���} �|�r�| �j �|��n��y4�t�j �|��d�t�j �d �d��d �|�d �|�d �| �} �Wn)�t�k �r7} �t�j�d �| �|����n�X|�d��k �rg��} �x�t�rt�| �j�j����}�|�srPn��|�j���}�| �j�|�d��t�j���t�j�k�rt�j�|��qM|�d��k �rM|�j���qMqMWn��| �j���|�d��k �r| �j�r|�j�d��q|�j�d��n��| �j�r|�d�k�rt�j���t�j�k�rq|� rqt�j�d�|��t�j�d�j�| ��d��n��t�d�|�| �j�|�f���q|�d�k�rt�j�d�|�| �j�|��q|�d�k�rqt�d�t �|����n��|�sd�j�| ��Sd��S(���Nt��� s��� t���"t���'s���"%s"s���\"s���Running command %st���stderrt���stdint���stdoutt���cwdt���envs#���Error %s while executing command %st���errort���doneR���s ���Complete output from command %s:R`���s)��� ----------------------------------------s,���Command "%s" failed with error code %s in %st���warns$���Command "%s" had error code %s in %st���ignores���Invalid value: on_returncode=%s(!���R���t ���subprocesst���PIPERM���R���Rl���R���t���debugR0���Ra���t���copyt���updatet���Popent���STDOUTRi���R���Rr���R���R���t���readlinet���rstript���getEffectiveLevelt ���std_loggingt���DEBUGt���spint���waitt ���returncodet���finishR���R���R���t ���ValueErrort���repr(���t���cmdt ���show_stdoutR���t ���on_returncodet ���command_desct ���extra_environt���spinnerR���t ���cmd_partst���partR���t���procR���t ���all_outputt���line(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR#���p��sz����    0               c���������C@��s���t��|��d���}�|�j���}�Wd�QXd�t�j�t��d�g�}�x9�|�D]1�}�y�|�j�|��}�Wn�t�k �rr�qC�n�XPqC�Wt�|��t�k�s�t ��|�S(���sR��Return the contents of *filename*. Try to decode the file contents with utf-8, the preferred system encoding (e.g., cp1252 on some Windows machines), and latin1, in that order. Decoding a byte string with latin1 will never raise an error. In the worst case, the returned string will contain some garbage characters. Rx���Ns���utf-8t���latin1( ���Ry���Rz���t���localet���getpreferredencodingRp���RR���t���UnicodeDecodeErrort���typeRn���t���AssertionError(���R{���R|���R���t ���encodingst���enc(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyt���read_text_file��s����   c���������C@��s���t��j�|���t�|���d��S(���N(���R0���R1���R ���(���t ���build_dir(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyt���_make_build_dir��s���� t���FakeFilec�����������B@��s)���e��Z�d��Z�d���Z�d���Z�d���Z�RS(���sQ���Wrap a list of lines in an object with readline() to make ConfigParser happy.c���������C@��s���d���|�D�|��_��d��S(���Nc���������s@��s���|��] �}�|�Vq�d��S(���N(����(���t���.0t���l(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pys ���<genexpr>��s����(���t���_gen(���t���selft���lines(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyt���__init__��s����c���������C@��sL���y3�y�t��|��j��SWn�t�k �r1�|��j�j����SXWn�t�k �rG�d�SXd��S(���NR`���(���t���nextR-��t ���NameErrort ���StopIteration(���R.��(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR ����s����  c���������C@��s���|��j��S(���N(���R-��(���R.��(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyt���__iter__��s����(���t���__name__t ���__module__t���__doc__R0��R ��R4��(����(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR*����s���  t ���StreamWrapperc�����������B@��s&���e��Z�e�d�����Z�e�d����Z�RS(���c���������C@��s���|�|��_��|����S(���N(���t ���orig_stream(���t���clsR9��(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyt ���from_stream��s���� c���������C@��s ���|��j��j�S(���N(���R9��t���encoding(���R.��(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR<�� ��s����(���R5��R6��t ���classmethodR;��t���propertyR<��(����(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR8����s���c���������c@��sR���t��t�|���}�t�t�|��t�j�|���z�t��t�|���VWd�t�t�|��|��Xd�S(���s���Return a context manager used by captured_stdout/stdin/stderr that temporarily replaces the sys stream *stream_name* with a StringIO. Taken from Lib/support/__init__.py in the CPython repo. N(���t���getattrR9���t���setattrR8��R;��(���t ���stream_namet ���orig_stdout(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyt���captured_output��s ����c�����������C@��s ���t��d��S(���s���Capture the output of sys.stdout: with captured_stdout() as stdout: print('hello') self.assertEqual(stdout.getvalue(), 'hello ') Taken from Lib/support/__init__.py in the CPython repo. R���(���RC��(����(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR$�����s���� t���cached_propertyc�����������B@��s ���e��Z�d��Z�d���Z�d���Z�RS(���s���A property that is only computed once per instance and then replaces itself with an ordinary attribute. Deleting the attribute resets the property. Source: https://github.com/bottlepy/bottle/blob/0.11.5/bottle.py#L175 c���������C@��s���t��|�d��|��_�|�|��_�d��S(���NR7��(���R?��R7��RK���(���R.��RK���(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR0��2��s����c���������C@��s4���|�d��k�r�|��S|��j�|��}�|�j�|��j�j�<|�S(���N(���R���RK���t���__dict__R5��(���R.��t���objR:��t���value(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyt���__get__6��s����  (���R5��R6��R7��R0��RH��(����(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyRD��*��s��� c���������C@��s\���t��j�j�|���}�|�d�k�r-�t��j���}�n�t��j�|��}�|�j�|��}�|�rX�|�j�Sd�S(���sC���Get the installed version of dist_name avoiding pkg_resources cacheN(���R ���t ���Requirementt���parseR���t ���WorkingSetR���t���version(���t ���dist_namet ���lookup_dirst���reqR���R���(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR(���>��s ���� c���������C@��s���t��|��d�d�d�S(���s���Consume an iterable at C speed.t���maxleni����N(���R���(���t���iterator(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyt���consumeR��s����(���s���.tar.bz2s���.tbz(���s���.tar.xzs���.txzs���.tlzs���.tar.lzs ���.tar.lzma(���s���.zips���.whl(���s���.tar.gzs���.tgzs���.tar(g���t ���__future__R����t ���collectionsR���t ���contextlibR3���t���ioR ��t���loggingR ��Rt���R0���R���RC���RF���R��R9���R���R���t���pip.exceptionsR���t ���pip.compatR���R���R���t ���pip.locationsR���R���R���R ���R ���t ���pip._vendorR ���t���pip._vendor.six.movesR ���t���pip._vendor.sixR ���t���pip._vendor.retryingR���R���R���t���__all__t ���getLoggerR5��R���R���R���R���R���R&���R'���t���bz2R*���R��t���lzmaR/���R%���R���Rp���R���RD���R���R���Rg���R���R���R���R���R���t���DEFAULT_BUFFER_SIZER���R���R���Rr���R���R���R���R���R���R���R���R���R���R���R���R���R���R ���R!���R"���R���R#���R'��R)��t���objectR*��R8��t���contextmanagerRC��R$���RD��R(���RR��(����(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyt���<module>���s���              (                     5 %    + L !_     PK�����!f[Q U]-��]-����ui.pyonu�[�������� abc�����������@`��s<��d��d�l��m�Z�d��d�l��m�Z�d��d�l�Z�d��d�l�Z�d��d�l�m�Z�m�Z�m�Z�d��d�l�Z�d��d�l �Z �d��d�l �Z �d��d�l �m �Z �d��d�l �m�Z�d��d�l�m�Z�d��d�l�m�Z�d��d �l�m�Z�m�Z�d��d �l�m�Z�m�Z�m�Z�d��d �l�m�Z�y�d��d �l�m�Z�Wn�e�k �r'd�Z�n�Xe �j�e ��Z!�d ���Z"�e"�e�e��Z#�d�e$�f�d�����YZ%�d�e$�f�d�����YZ&�d�e$�f�d�����YZ'�d�e'�e%�e&�e#�f�d�����YZ(�d�e'�e%�e&�e�e�f�d�����YZ)�e �j*�d����Z+�d�e$�f�d�����YZ,�d�e$�f�d�����YZ-�d�e$�f�d�����YZ.�e �j*�d����Z/�d�S( ���i����(���t���absolute_import(���t���divisionN(���t���signalt���SIGINTt���default_int_handler(���t���WINDOWS(���t ���format_size(���t���get_indentation(���t���six(���t���Bart���IncrementalBar(���t ���WritelnMixint ���HIDE_CURSORt ���SHOW_CURSOR(���t���Spinner(���t���coloramac���������C`��s���t��|��j�d�d���}�|�s�|�St��|��d�t�j����t��|��d�t�j����g�}�|�t�t��|��d�g����7}�y �t�j���j�|��j�|��Wn�t�k �r�|�SX|��Sd��S(���Nt���encodingt ���empty_fillt���fillt���phases( ���t���getattrt���filet���NoneR���t ���text_typet���listt���joint���encodet���UnicodeEncodeError(���t ���preferredt���fallbackR���t ���characters(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyt���_select_progress_class���s����  t���InterruptibleMixinc�����������B`��s)���e��Z�d��Z�d���Z�d���Z�d���Z�RS(���s�� Helper to ensure that self.finish() gets called on keyboard interrupt. This allows downloads to be interrupted without leaving temporary state (like hidden cursors) behind. This class is similar to the progress library's existing SigIntMixin helper, but as of version 1.2, that helper has the following problems: 1. It calls sys.exit(). 2. It discards the existing SIGINT handler completely. 3. It leaves its own handler in place even after an uninterrupted finish, which will have unexpected delayed effects if the user triggers an unrelated keyboard interrupt some time after a progress-displaying download has already completed, for example. c���������O`��sM���t��t�|���j�|�|���t�t�|��j��|��_�|��j�d�k�rI�t�|��_�n��d�S(���s=��� Save the original SIGINT handler for later. N( ���t���superR ���t���__init__R���R���t ���handle_sigintt���original_handlerR���R���(���t���selft���argst���kwargs(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyR"���N���s����c���������C`��s'���t��t�|���j���t�t�|��j��d�S(���s��� Restore the original SIGINT handler after finishing. This should happen regardless of whether the progress display finishes normally, or gets interrupted. N(���R!���R ���t���finishR���R���R$���(���R%���(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyR(���^���s����c���������C`��s���|��j����|��j�|�|��d�S(���s��� Call self.finish() before delegating to the original SIGINT handler. This handler should only be in place while the progress display is active. N(���R(���R$���(���R%���t���signumt���frame(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyR#���h���s���� (���t���__name__t ���__module__t���__doc__R"���R(���R#���(����(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyR ���<���s���  t���DownloadProgressMixinc�����������B`��sJ���e��Z�d����Z�e�d����Z�e�d����Z�e�d����Z�d�d��Z�RS(���c���������O`��s8���t��t�|���j�|�|���d�t���d�|��j�|��_�d��S(���Nt��� i���(���R!���R.���R"���R���t���message(���R%���R&���R'���(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyR"���u���s����c���������C`��s ���t��|��j��S(���N(���R���t���index(���R%���(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyt ���downloadedy���s����c���������C`��s(���|��j��d�k�r�d�St�d�|��j���d�S(���Ng��������s���...i���s���/s(���t���avgR���(���R%���(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyt���download_speed}���s����c���������C`��s���|��j��r�d�|��j�Sd�S(���Ns���eta %st����(���t���etat���eta_td(���R%���(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyt ���pretty_eta���s����  i���c���������c`��s1���x �|�D]�}�|�V|��j��|��q�W|��j���d��S(���N(���t���nextR(���(���R%���t���itt���nt���x(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyt���iter���s���� (���R+���R,���R"���t���propertyR2���R4���R8���R=���(����(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyR.���s���s ��� t ���WindowsMixinc�����������B`��s���e��Z�d����Z�RS(���c���������`��s���t��r���j�r�t���_�n��t�t����j�|�|���t��r�t�r�t�j���j����_���f�d�����j�_ ���f�d�����j�_ �n��d��S(���Nc�����������`��s�����j��j�j���S(���N(���R���t���wrappedt���isatty(����(���R%���(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyt���<lambda>���R5���c�����������`��s�����j��j�j���S(���N(���R���R@���t���flush(����(���R%���(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyRB������R5���( ���R���t ���hide_cursort���FalseR!���R?���R"���R���t ���AnsiToWin32R���RA���RC���(���R%���R&���R'���(����(���R%���s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyR"������s����  (���R+���R,���R"���(����(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyR?������s���t���DownloadProgressBarc�����������B`��s���e��Z�e�j�Z�d��Z�d�Z�RS(���s ���%(percent)d%%s0���%(downloaded)s %(download_speed)s %(pretty_eta)s(���R+���R,���t���syst���stdoutR���R0���t���suffix(����(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyRG������s��� t���DownloadProgressSpinnerc�����������B`��s)���e��Z�e�j�Z�d��Z�d���Z�d���Z�RS(���s!���%(downloaded)s %(download_speed)sc���������C`��s4���t��|��d��s'�t�j�|��j��|��_�n��t�|��j��S(���Nt���_phaser(���t���hasattrt ���itertoolst���cycleR���RL���R9���(���R%���(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyt ���next_phase���s����c���������C`��sm���|��j��|��}�|��j���}�|��j�|��}�d�j�|�|�r;�d�n�d�|�|�rM�d�n�d�|�g��}�|��j�|��d��S(���NR5���R/���(���R0���RP���RJ���R���t���writeln(���R%���R0���t���phaseRJ���t���line(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyt���update���s����    (���R+���R,���RH���RI���R���RJ���RP���RT���(����(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyRK������s���  c���������c`��sc���t��r�d��VnQ�|��j��� s0�t�j���t�j�k�r8�d��Vn'�|��j�t��z �d��VWd��|��j�t��Xd��S(���N( ���R���RA���t���loggert���getEffectiveLevelt���loggingt���INFOt���writeR ���R ���(���R���(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyt ���hidden_cursor���s����"  t ���RateLimiterc�����������B`��s#���e��Z�d����Z�d���Z�d���Z�RS(���c���������C`��s���|�|��_��d�|��_�d��S(���Ni����(���t���_min_update_interval_secondst ���_last_update(���R%���t���min_update_interval_seconds(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyR"������s���� c���������C`��s&���t��j����}�|�|��j�}�|�|��j�k�S(���N(���t���timeR]���R\���(���R%���t���nowt���delta(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyt���ready���s����  c���������C`��s���t��j����|��_�d��S(���N(���R_���R]���(���R%���(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyt���reset���s����(���R+���R,���R"���Rb���Rc���(����(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyR[������s���  t���InteractiveSpinnerc�����������B`��s5���e��Z�d�d��d�d��Z�d���Z�d���Z�d���Z�RS(���s���-\|/g������?c���������C`��s���|�|��_��|�d��k�r!�t�j�}�n��|�|��_�t�|��|��_�t�|��_�t �j �|��|��_ �|��j�j �d�t ���|��j��d��d�|��_�d��S(���NR/���s��� ... i����(���t���_messageR���RH���RI���t���_fileR[���t ���_rate_limiterRE���t ���_finishedRN���RO���t ���_spin_cycleRY���R���t���_width(���R%���R0���R���t ���spin_charsR^���(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyR"������s����     "c���������C`��si���d�|��j��}�|��j�j�|�d�|��j��|��|��j�j�|��t�|��|��_��|��j�j���|��j�j���d��S(���Ns���R/���(���Rj���Rf���RY���t���lenRC���Rg���Rc���(���R%���t���statust���backup(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyt���_write ��s ����  c���������C`��s:���|��j��r �d��S|��j�j���s �d��S|��j�t�|��j���d��S(���N(���Rh���Rg���Rb���Ro���R9���Ri���(���R%���(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyt���spin��s ���� c���������C`��sD���|��j��r �d��S|��j�|��|��j�j�d��|��j�j���t�|��_��d��S(���Ns��� (���Rh���Ro���Rf���RY���RC���t���True(���R%���t ���final_status(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyR(�����s ����   N(���R+���R,���R���R"���Ro���Rp���R(���(����(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyRd������s ��� t���NonInteractiveSpinnerc�����������B`��s/���e��Z�d��d��Z�d���Z�d���Z�d���Z�RS(���i<���c���������C`��s2���|�|��_��t�|��_�t�|��|��_�|��j�d��d��S(���Nt���started(���Re���RE���Rh���R[���Rg���t���_update(���R%���R0���R^���(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyR"���*��s����  c���������C`��s'���|��j��j���t�j�d�|��j�|��d��S(���Ns���%s: %s(���Rg���Rc���RU���t���infoRe���(���R%���Rm���(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyRu���0��s���� c���������C`��s1���|��j��r �d��S|��j�j���s �d��S|��j�d��d��S(���Ns���still running...(���Rh���Rg���Rb���Ru���(���R%���(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyRp���5��s ���� c���������C`��s.���|��j��r �d��S|��j�d�|�f��t�|��_��d��S(���Ns���finished with status '%s'(���Rh���Ru���Rq���(���R%���Rr���(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyR(���<��s���� (���R+���R,���R"���Ru���Rp���R(���(����(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyRs���)��s���   c���������c`��s���t��j�j���r3�t�j���t�j�k�r3�t�|���}�n �t�|���}�y�t �t��j�� �|�VWd��QXWnA�t �k �r�|�j �d����n.�t �k �r�|�j �d����n�X|�j �d��d��S(���Nt���canceledt���errort���done( ���RH���RI���RA���RU���RV���RW���RX���Rd���Rs���RZ���t���KeyboardInterruptR(���t ���Exception(���R0���t���spinner(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyt ���open_spinnerC��s����$     (0���t ���__future__R����R���RN���RH���R���R���R���R_���t ���contextlibRW���t ���pip.compatR���t ���pip.utilsR���t���pip.utils.loggingR���t ���pip._vendorR���t���pip._vendor.progress.barR ���R ���t���pip._vendor.progress.helpersR ���R ���R ���t���pip._vendor.progress.spinnerR���R���R{���R���t ���getLoggerR+���RU���R���t���_BaseBart���objectR ���R.���R?���RG���RK���t���contextmanagerRZ���R[���Rd���Rs���R}���(����(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyt���<module>���sB���        7  !0PK�����!f[3z���� ��logging.pyonu�[�������� abc�����������@@��se��d��d�l��m�Z�d��d�l�Z�d��d�l�Z�d��d�l�Z�d��d�l�Z�y�d��d�l�Z�Wn�e�k �ro�d��d�l�Z�n�Xd��d�l �m �Z �d��d�l �m �Z �y�d��d�l �m�Z�Wn�e�k �r�d�Z�n�Xe�j���Z�d��e�_�e�j�d�d���Z�d���Z�d �e�j�f�d �����YZ�d ���Z�d �e�j�f�d �����YZ�d�e�j�j�f�d�����YZ�d�e�j�f�d�����YZ �d�S(���i����(���t���absolute_importN(���t���WINDOWS(���t ���ensure_dir(���t���coloramai���c���������c@��s/���t��j�|��7_�z �d�VWd�t��j�|��8_�Xd�S(���sv��� A context manager which will cause the log output to be indented for any log messages emitted inside it. N(���t ���_log_statet ���indentation(���t���num(����(����s5���/usr/lib/python2.7/site-packages/pip/utils/logging.pyt ���indent_log���s���� c�����������C@��s���t��t�d�d��S(���NR���i����(���t���getattrR���(����(����(����s5���/usr/lib/python2.7/site-packages/pip/utils/logging.pyt���get_indentation)���s����t���IndentingFormatterc�����������B@��s���e��Z�d����Z�RS(���c���������C@��sO���t��j�j�|��|��}�d�j�g��|�j�t��D]�}�d�t���|�^�q+��}�|�S(���s��� Calls the standard formatter, but will indent all of the log messages by our current indentation level. t����t��� (���t���loggingt ���Formattert���formatt���joint ���splitlinest���TrueR ���(���t���selft���recordt ���formattedt���line(����(����s5���/usr/lib/python2.7/site-packages/pip/utils/logging.pyR���/���s ����-(���t���__name__t ���__module__R���(����(����(����s5���/usr/lib/python2.7/site-packages/pip/utils/logging.pyR ���-���s���c����������@��s�����f�d���}�|�S(���Nc���������@��s#���d�j��t����|��t�j�j�g��S(���NR ���(���R���t���listR���t���Stylet ���RESET_ALL(���t���inp(���t���colors(����s5���/usr/lib/python2.7/site-packages/pip/utils/logging.pyt���wrapped=���s����(����(���R���R���(����(���R���s5���/usr/lib/python2.7/site-packages/pip/utils/logging.pyt ���_color_wrap<���s����t���ColorizedStreamHandlerc�����������B@��sk���e��Z�e�rE�e�j�e�e�j�j��f�e�j�e�e�j�j ��f�g�Z �n�g��Z �d�d���Z �d���Z �d���Z�RS(���c���������C@��s;���t��j�j�|��|��t�r7�t�r7�t�j�|��j��|��_�n��d��S(���N(���R ���t ���StreamHandlert���__init__R���R���t ���AnsiToWin32t���stream(���R���R$���(����(����s5���/usr/lib/python2.7/site-packages/pip/utils/logging.pyR"���N���s���� c���������C@��ss���t��s �t�St�|��j�t��j��s(�|��j�n �|��j�j�}�t�|�d��rS�|�j���rS�t�St �j �j �d��d�k�ro�t�St�S(���Nt���isattyt���TERMt���ANSI( ���R���t���Falset ���isinstanceR$���R#���R���t���hasattrR%���R���t���ost���environt���get(���R���t ���real_stream(����(����s5���/usr/lib/python2.7/site-packages/pip/utils/logging.pyt ���should_colorT���s���� c���������C@��sa���t��j�j�|��|��}�|��j���r]�x9�|��j�D]+�\�}�}�|�j�|�k�r+�|�|��}�Pq+�q+�Wn��|�S(���N(���R ���R!���R���R/���t���COLORSt���levelno(���R���R���t���msgt���levelt���color(����(����s5���/usr/lib/python2.7/site-packages/pip/utils/logging.pyR���i���s����   N(���R���R���R���R ���t���ERRORR���t���Foret���REDt���WARNINGt���YELLOWR0���t���NoneR"���R/���R���(����(����(����s5���/usr/lib/python2.7/site-packages/pip/utils/logging.pyR ���B���s���!  t���BetterRotatingFileHandlerc�����������B@��s���e��Z�d����Z�RS(���c���������C@��s,���t��t�j�j�|��j���t�j�j�j�|���S(���N( ���R���R+���t���patht���dirnamet ���baseFilenameR ���t���handlerst���RotatingFileHandlert���_open(���R���(����(����s5���/usr/lib/python2.7/site-packages/pip/utils/logging.pyRA���w���s����(���R���R���RA���(����(����(����s5���/usr/lib/python2.7/site-packages/pip/utils/logging.pyR;���u���s���t���MaxLevelFilterc�����������B@��s���e��Z�d����Z�d���Z�RS(���c���������C@��s ���|�|��_��d��S(���N(���R3���(���R���R3���(����(����s5���/usr/lib/python2.7/site-packages/pip/utils/logging.pyR"���~���s����c���������C@��s���|�j��|��j�k��S(���N(���R1���R3���(���R���R���(����(����s5���/usr/lib/python2.7/site-packages/pip/utils/logging.pyt���filter���s����(���R���R���R"���RC���(����(����(����s5���/usr/lib/python2.7/site-packages/pip/utils/logging.pyRB���|���s��� (!���t ���__future__R����t ���contextlibR ���t���logging.handlersR+���t ���threadingt ���ImportErrort���dummy_threadingt ���pip.compatR���t ���pip.utilsR���t ���pip._vendorR���t ���ExceptionR:���t���localR���R���t���contextmanagerR���R ���R���R ���R���R!���R ���R?���R@���R;���t���FilterRB���(����(����(����s5���/usr/lib/python2.7/site-packages/pip/utils/logging.pyt���<module>���s0���           3PK�����!f[ӣ-��-����ui.pycnu�[�������� abc�����������@`��s<��d��d�l��m�Z�d��d�l��m�Z�d��d�l�Z�d��d�l�Z�d��d�l�m�Z�m�Z�m�Z�d��d�l�Z�d��d�l �Z �d��d�l �Z �d��d�l �m �Z �d��d�l �m�Z�d��d�l�m�Z�d��d�l�m�Z�d��d �l�m�Z�m�Z�d��d �l�m�Z�m�Z�m�Z�d��d �l�m�Z�y�d��d �l�m�Z�Wn�e�k �r'd�Z�n�Xe �j�e ��Z!�d ���Z"�e"�e�e��Z#�d�e$�f�d�����YZ%�d�e$�f�d�����YZ&�d�e$�f�d�����YZ'�d�e'�e%�e&�e#�f�d�����YZ(�d�e'�e%�e&�e�e�f�d�����YZ)�e �j*�d����Z+�d�e$�f�d�����YZ,�d�e$�f�d�����YZ-�d�e$�f�d�����YZ.�e �j*�d����Z/�d�S( ���i����(���t���absolute_import(���t���divisionN(���t���signalt���SIGINTt���default_int_handler(���t���WINDOWS(���t ���format_size(���t���get_indentation(���t���six(���t���Bart���IncrementalBar(���t ���WritelnMixint ���HIDE_CURSORt ���SHOW_CURSOR(���t���Spinner(���t���coloramac���������C`��s���t��|��j�d�d���}�|�s�|�St��|��d�t�j����t��|��d�t�j����g�}�|�t�t��|��d�g����7}�y �t�j���j�|��j�|��Wn�t�k �r�|�SX|��Sd��S(���Nt���encodingt ���empty_fillt���fillt���phases( ���t���getattrt���filet���NoneR���t ���text_typet���listt���joint���encodet���UnicodeEncodeError(���t ���preferredt���fallbackR���t ���characters(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyt���_select_progress_class���s����  t���InterruptibleMixinc�����������B`��s)���e��Z�d��Z�d���Z�d���Z�d���Z�RS(���s�� Helper to ensure that self.finish() gets called on keyboard interrupt. This allows downloads to be interrupted without leaving temporary state (like hidden cursors) behind. This class is similar to the progress library's existing SigIntMixin helper, but as of version 1.2, that helper has the following problems: 1. It calls sys.exit(). 2. It discards the existing SIGINT handler completely. 3. It leaves its own handler in place even after an uninterrupted finish, which will have unexpected delayed effects if the user triggers an unrelated keyboard interrupt some time after a progress-displaying download has already completed, for example. c���������O`��sM���t��t�|���j�|�|���t�t�|��j��|��_�|��j�d�k�rI�t�|��_�n��d�S(���s=��� Save the original SIGINT handler for later. N( ���t���superR ���t���__init__R���R���t ���handle_sigintt���original_handlerR���R���(���t���selft���argst���kwargs(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyR"���N���s����c���������C`��s'���t��t�|���j���t�t�|��j��d�S(���s��� Restore the original SIGINT handler after finishing. This should happen regardless of whether the progress display finishes normally, or gets interrupted. N(���R!���R ���t���finishR���R���R$���(���R%���(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyR(���^���s����c���������C`��s���|��j����|��j�|�|��d�S(���s��� Call self.finish() before delegating to the original SIGINT handler. This handler should only be in place while the progress display is active. N(���R(���R$���(���R%���t���signumt���frame(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyR#���h���s���� (���t���__name__t ���__module__t���__doc__R"���R(���R#���(����(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyR ���<���s���  t���DownloadProgressMixinc�����������B`��sJ���e��Z�d����Z�e�d����Z�e�d����Z�e�d����Z�d�d��Z�RS(���c���������O`��s8���t��t�|���j�|�|���d�t���d�|��j�|��_�d��S(���Nt��� i���(���R!���R.���R"���R���t���message(���R%���R&���R'���(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyR"���u���s����c���������C`��s ���t��|��j��S(���N(���R���t���index(���R%���(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyt ���downloadedy���s����c���������C`��s(���|��j��d�k�r�d�St�d�|��j���d�S(���Ng��������s���...i���s���/s(���t���avgR���(���R%���(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyt���download_speed}���s����c���������C`��s���|��j��r�d�|��j�Sd�S(���Ns���eta %st����(���t���etat���eta_td(���R%���(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyt ���pretty_eta���s����  i���c���������c`��s1���x �|�D]�}�|�V|��j��|��q�W|��j���d��S(���N(���t���nextR(���(���R%���t���itt���nt���x(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyt���iter���s���� (���R+���R,���R"���t���propertyR2���R4���R8���R=���(����(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyR.���s���s ��� t ���WindowsMixinc�����������B`��s���e��Z�d����Z�RS(���c���������`��s���t��r���j�r�t���_�n��t�t����j�|�|���t��r�t�r�t�j���j����_���f�d�����j�_ ���f�d�����j�_ �n��d��S(���Nc�����������`��s�����j��j�j���S(���N(���R���t���wrappedt���isatty(����(���R%���(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyt���<lambda>���R5���c�����������`��s�����j��j�j���S(���N(���R���R@���t���flush(����(���R%���(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyRB������R5���( ���R���t ���hide_cursort���FalseR!���R?���R"���R���t ���AnsiToWin32R���RA���RC���(���R%���R&���R'���(����(���R%���s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyR"������s����  (���R+���R,���R"���(����(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyR?������s���t���DownloadProgressBarc�����������B`��s���e��Z�e�j�Z�d��Z�d�Z�RS(���s ���%(percent)d%%s0���%(downloaded)s %(download_speed)s %(pretty_eta)s(���R+���R,���t���syst���stdoutR���R0���t���suffix(����(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyRG������s��� t���DownloadProgressSpinnerc�����������B`��s)���e��Z�e�j�Z�d��Z�d���Z�d���Z�RS(���s!���%(downloaded)s %(download_speed)sc���������C`��s4���t��|��d��s'�t�j�|��j��|��_�n��t�|��j��S(���Nt���_phaser(���t���hasattrt ���itertoolst���cycleR���RL���R9���(���R%���(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyt ���next_phase���s����c���������C`��sm���|��j��|��}�|��j���}�|��j�|��}�d�j�|�|�r;�d�n�d�|�|�rM�d�n�d�|�g��}�|��j�|��d��S(���NR5���R/���(���R0���RP���RJ���R���t���writeln(���R%���R0���t���phaseRJ���t���line(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyt���update���s����    (���R+���R,���RH���RI���R���RJ���RP���RT���(����(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyRK������s���  c���������c`��sc���t��r�d��VnQ�|��j��� s0�t�j���t�j�k�r8�d��Vn'�|��j�t��z �d��VWd��|��j�t��Xd��S(���N( ���R���RA���t���loggert���getEffectiveLevelt���loggingt���INFOt���writeR ���R ���(���R���(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyt ���hidden_cursor���s����"  t ���RateLimiterc�����������B`��s#���e��Z�d����Z�d���Z�d���Z�RS(���c���������C`��s���|�|��_��d�|��_�d��S(���Ni����(���t���_min_update_interval_secondst ���_last_update(���R%���t���min_update_interval_seconds(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyR"������s���� c���������C`��s&���t��j����}�|�|��j�}�|�|��j�k�S(���N(���t���timeR]���R\���(���R%���t���nowt���delta(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyt���ready���s����  c���������C`��s���t��j����|��_�d��S(���N(���R_���R]���(���R%���(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyt���reset���s����(���R+���R,���R"���Rb���Rc���(����(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyR[������s���  t���InteractiveSpinnerc�����������B`��s5���e��Z�d�d��d�d��Z�d���Z�d���Z�d���Z�RS(���s���-\|/g������?c���������C`��s���|�|��_��|�d��k�r!�t�j�}�n��|�|��_�t�|��|��_�t�|��_�t �j �|��|��_ �|��j�j �d�t ���|��j��d��d�|��_�d��S(���NR/���s��� ... i����(���t���_messageR���RH���RI���t���_fileR[���t ���_rate_limiterRE���t ���_finishedRN���RO���t ���_spin_cycleRY���R���t���_width(���R%���R0���R���t ���spin_charsR^���(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyR"������s����     "c���������C`��sy���|��j�� s�t��d�|��j�}�|��j�j�|�d�|��j�|��|��j�j�|��t�|��|��_�|��j�j���|��j�j���d��S(���Ns���R/���( ���Rh���t���AssertionErrorRj���Rf���RY���t���lenRC���Rg���Rc���(���R%���t���statust���backup(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyt���_write ��s����  c���������C`��s:���|��j��r �d��S|��j�j���s �d��S|��j�t�|��j���d��S(���N(���Rh���Rg���Rb���Rp���R9���Ri���(���R%���(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyt���spin��s ���� c���������C`��sD���|��j��r �d��S|��j�|��|��j�j�d��|��j�j���t�|��_��d��S(���Ns��� (���Rh���Rp���Rf���RY���RC���t���True(���R%���t ���final_status(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyR(�����s ����   N(���R+���R,���R���R"���Rp���Rq���R(���(����(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyRd������s ��� t���NonInteractiveSpinnerc�����������B`��s/���e��Z�d��d��Z�d���Z�d���Z�d���Z�RS(���i<���c���������C`��s2���|�|��_��t�|��_�t�|��|��_�|��j�d��d��S(���Nt���started(���Re���RE���Rh���R[���Rg���t���_update(���R%���R0���R^���(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyR"���*��s����  c���������C`��s7���|��j�� s�t��|��j�j���t�j�d�|��j�|��d��S(���Ns���%s: %s(���Rh���Rl���Rg���Rc���RU���t���infoRe���(���R%���Rn���(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyRv���0��s���� c���������C`��s1���|��j��r �d��S|��j�j���s �d��S|��j�d��d��S(���Ns���still running...(���Rh���Rg���Rb���Rv���(���R%���(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyRq���5��s ���� c���������C`��s.���|��j��r �d��S|��j�d�|�f��t�|��_��d��S(���Ns���finished with status '%s'(���Rh���Rv���Rr���(���R%���Rs���(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyR(���<��s���� (���R+���R,���R"���Rv���Rq���R(���(����(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyRt���)��s���   c���������c`��s���t��j�j���r3�t�j���t�j�k�r3�t�|���}�n �t�|���}�y�t �t��j�� �|�VWd��QXWnA�t �k �r�|�j �d����n.�t �k �r�|�j �d����n�X|�j �d��d��S(���Nt���canceledt���errort���done( ���RH���RI���RA���RU���RV���RW���RX���Rd���Rt���RZ���t���KeyboardInterruptR(���t ���Exception(���R0���t���spinner(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyt ���open_spinnerC��s����$     (0���t ���__future__R����R���RN���RH���R���R���R���R_���t ���contextlibRW���t ���pip.compatR���t ���pip.utilsR���t���pip.utils.loggingR���t ���pip._vendorR���t���pip._vendor.progress.barR ���R ���t���pip._vendor.progress.helpersR ���R ���R ���t���pip._vendor.progress.spinnerR���R���R|���R���t ���getLoggerR+���RU���R���t���_BaseBart���objectR ���R.���R?���RG���RK���t���contextmanagerRZ���R[���Rd���Rt���R~���(����(����(����s0���/usr/lib/python2.7/site-packages/pip/utils/ui.pyt���<module>���sB���        7  !0PK�����!f[`" !��!�� ��appdirs.pyonu�[�������� abc�����������@@��s���d��Z��d�d�l�m�Z�d�d�l�Z�d�d�l�Z�d�d�l�m�Z�m�Z�d�d�l�m �Z �m �Z �d���Z �e �d��Z �e�d��Z�d ���Z�d ���Z�d ���Z�e�r�y�d�d�l�Z�e�Z�Wq�e�k �r�e�Z�q�Xn��d ���Z�d�S( ���sd��� This code was taken from https://github.com/ActiveState/appdirs and modified to suit our purposes. i����(���t���absolute_importN(���t���WINDOWSt ���expanduser(���t���PY2t ���text_typec���������C@��s���t��r]�t�j�j�t�d���}�t�rB�t�|�t��rB�t�|��}�n��t�j�j �|�|��d��}�n`�t �j �d�k�r�t �d��}�t�j�j �|�|���}�n-�t�j �d�t �d���}�t�j�j �|�|���}�|�S(���s5�� Return full path to the user-specific cache dir for this application. "appname" is the name of application. Typical user cache directories are: macOS: ~/Library/Caches/<AppName> Unix: ~/.cache/<AppName> (XDG default) Windows: C:\Users\<username>\AppData\Local\<AppName>\Cache On Windows the only suggestion in the MSDN docs is that local settings go in the `CSIDL_LOCAL_APPDATA` directory. This is identical to the non-roaming app data dir (the default returned by `user_data_dir`). Apps typically put cache data somewhere *under* the given dir here. Some examples: ...\Mozilla\Firefox\Profiles\<ProfileName>\Cache ...\Acme\SuperApp\Cache\1.0 OPINION: This function appends "Cache" to the `CSIDL_LOCAL_APPDATA` value. t���CSIDL_LOCAL_APPDATAt���Cachet���darwins���~/Library/Cachest���XDG_CACHE_HOMEs���~/.cache(���R���t���ost���patht���normpatht���_get_win_folderR���t ���isinstanceR���t���_win_path_to_bytest���joint���syst���platformR���t���getenv(���t���appnameR ���(����(����s5���/usr/lib/python2.7/site-packages/pip/utils/appdirs.pyt���user_cache_dir���s���� c���������C@��s���t��rB�|�r�d�p�d�}�t�j�j�t�j�j�t�|���|���}�nT�t�j�d�k�ro�t�j�j�t�d��|���}�n'�t�j�j�t�j �d�t�d���|���}�|�S(���sS�� Return full path to the user-specific data dir for this application. "appname" is the name of application. If None, just the system directory is returned. "roaming" (boolean, default False) can be set True to use the Windows roaming appdata directory. That means that for users on a Windows network setup for roaming profiles, this user data will be sync'd on login. See <http://technet.microsoft.com/en-us/library/cc766489(WS.10).aspx> for a discussion of issues. Typical user data directories are: macOS: ~/Library/Application Support/<AppName> Unix: ~/.local/share/<AppName> # or in $XDG_DATA_HOME, if defined Win XP (not roaming): C:\Documents and Settings\<username>\ ... ...Application Data\<AppName> Win XP (roaming): C:\Documents and Settings\<username>\Local ... ...Settings\Application Data\<AppName> Win 7 (not roaming): C:\Users\<username>\AppData\Local\<AppName> Win 7 (roaming): C:\Users\<username>\AppData\Roaming\<AppName> For Unix, we follow the XDG spec and support $XDG_DATA_HOME. That means, by default "~/.local/share/<AppName>". t ���CSIDL_APPDATAR���R���s���~/Library/Application Support/t ���XDG_DATA_HOMEs���~/.local/share( ���R���R ���R ���R���R ���R ���R���R���R���R���(���R���t���roamingt���constR ���(����(����s5���/usr/lib/python2.7/site-packages/pip/utils/appdirs.pyt ���user_data_dir>���s����*     c���������C@��sj���t��r�t�|��d�|�}�nK�t�j�d�k�r9�t�|���}�n-�t�j�d�t�d���}�t�j�j�|�|���}�|�S(���sr��Return full path to the user-specific config dir for this application. "appname" is the name of application. If None, just the system directory is returned. "roaming" (boolean, default True) can be set False to not use the Windows roaming appdata directory. That means that for users on a Windows network setup for roaming profiles, this user data will be sync'd on login. See <http://technet.microsoft.com/en-us/library/cc766489(WS.10).aspx> for a discussion of issues. Typical user data directories are: macOS: same as user_data_dir Unix: ~/.config/<AppName> Win *: same as user_data_dir For Unix, we follow the XDG spec and support $XDG_CONFIG_HOME. That means, by default "~/.config/<AppName>". R���R���t���XDG_CONFIG_HOMEs ���~/.config( ���R���R���R���R���R ���R���R���R ���R���(���R���R���R ���(����(����s5���/usr/lib/python2.7/site-packages/pip/utils/appdirs.pyt���user_config_dirj���s����c���������C@��s���t��r9�t�j�j�t�d���}�t�j�j�|�|���g�}�n�t�j�d�k�rc�t�j�j�d�|���g�}�nh�t�j�d�d��}�|�r�g��|�j �t�j ��D]!�}�t�j�j�t �|��|���^�q�}�n�g��}�|�j �d��|�S(���s��Return a list of potential user-shared config dirs for this application. "appname" is the name of application. Typical user config directories are: macOS: /Library/Application Support/<AppName>/ Unix: /etc or $XDG_CONFIG_DIRS[i]/<AppName>/ for each value in $XDG_CONFIG_DIRS Win XP: C:\Documents and Settings\All Users\Application ... ...Data\<AppName> Vista: (Fail! "C:\ProgramData" is a hidden *system* directory on Vista.) Win 7: Hidden, but writeable on Win 7: C:\ProgramData\<AppName> t���CSIDL_COMMON_APPDATAR���s���/Library/Application Supportt���XDG_CONFIG_DIRSs���/etc/xdgs���/etc( ���R���R ���R ���R ���R ���R���R���R���R���t���splitt���pathsepR���t���append(���R���R ���t���pathlistt���xdg_config_dirst���x(����(����s5���/usr/lib/python2.7/site-packages/pip/utils/appdirs.pyt���site_config_dirs���s����: c���������C@��s\���d�d�l��}�i�d�d�6d�d�6d�d�6|��}�|�j�|�j�d ��}�|�j�|�|��\�}�}�|�S( ���s��� This is a fallback technique at best. I'm not sure if using the registry for this guarantees us the correct answer for all CSIDL_* names. i����Nt���AppDataR���s���Common AppDataR���s ���Local AppDataR���s@���Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders(���t���_winregt���OpenKeyt���HKEY_CURRENT_USERt ���QueryValueEx(���t ���csidl_nameR&���t���shell_folder_namet���keyt ���directoryt���_type(����(����s5���/usr/lib/python2.7/site-packages/pip/utils/appdirs.pyt���_get_win_folder_from_registry���s����  c���������C@��s���i�d�d�6d�d�6d�d�6|��}�t��j�d��}�t��j�j�j�d��|�d��d�|��t�}�x*�|�D]"�}�t�|��d �k�rZ�t�}�PqZ�qZ�W|�r�t��j�d��}�t��j�j �j �|�j �|�d��r�|�}�q�n��|�j �S( ���Ni���R���i#���R���i���R���i���i����i���( ���t���ctypest���create_unicode_buffert���windllt���shell32t���SHGetFolderPathWt���Nonet���Falset���ordt���Truet���kernel32t���GetShortPathNameWt���value(���R*���t ���csidl_constt���buft ���has_high_chart���ct���buf2(����(����s5���/usr/lib/python2.7/site-packages/pip/utils/appdirs.pyt���_get_win_folder_with_ctypes���s"����  c���������C@��s@���x9�d�D]1�}�y�|��j��|��SWq�t�t�f�k �r7�q�Xq�W|��S(���s��Encode Windows paths to bytes. Only used on Python 2. Motivation is to be consistent with other operating systems where paths are also returned as bytes. This avoids problems mixing bytes and Unicode elsewhere in the codebase. For more details and discussion see <https://github.com/pypa/pip/issues/3463>. If encoding using ASCII and MBCS fails, return the original Unicode path. t���ASCIIt���MBCS(���RB���RC���(���t���encodet���UnicodeEncodeErrort ���LookupError(���R ���t���encoding(����(����s5���/usr/lib/python2.7/site-packages/pip/utils/appdirs.pyR������s ���� (���t���__doc__t ���__future__R����R ���R���t ���pip.compatR���R���t���pip._vendor.sixR���R���R���R6���R���R8���R���R$���R/���RA���R0���R ���t ���ImportErrorR���(����(����(����s5���/usr/lib/python2.7/site-packages/pip/utils/appdirs.pyt���<module>���s$���   0 , ! (      PK�����!f[ILh0��0�� ��outdated.pycnu�[�������� abc�����������@@��s.��d��d�l��m�Z�d��d�l�Z�d��d�l�Z�d��d�l�Z�d��d�l�Z�d��d�l�Z�d��d�l�m �Z �d��d�l �m �Z �d��d�l �m�Z�m�Z�d��d�l�m�Z�d��d�l�m�Z�m�Z�d��d�l�m�Z�m�Z�d��d �l�m�Z�d �Z�e�j�e��Z�d �e�f�d �����YZ�d �e�f�d�����YZ �d���Z!�d���Z"�d���Z#�d�S(���i����(���t���absolute_importN(���t���lockfile(���t���version(���t ���total_secondst���WINDOWS(���t���PyPI(���t���USER_CACHE_DIRt���running_under_virtualenv(���t ���ensure_dirt���get_installed_version(���t���check_path_owners���%Y-%m-%dT%H:%M:%SZt���VirtualenvSelfCheckStatec�����������B@��s���e��Z�d����Z�d���Z�RS(���c���������C@��sp���t��j�j�t�j�d��|��_�y.�t�|��j���}�t�j�|��|��_ �Wd��QXWn �t �t �f�k �rk�i��|��_ �n�Xd��S(���Ns���pip-selfcheck.json( ���t���ost���patht���joint���syst���prefixt���statefile_patht���opent���jsont���loadt���statet���IOErrort ���ValueError(���t���selft ���statefile(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/outdated.pyt���__init__���s ����c������ ���C@��sR���t��|��j�d��:�}�t�j�i�|�j�t��d�6|�d�6|�d�t�d�d�Wd��QXd��S( ���Nt���wt ���last_checkt ���pypi_versiont ���sort_keyst ���separatorst���,t���:(���R ���R!���(���R���R���R���t���dumpt���strftimet���SELFCHECK_DATE_FMTt���True(���R���R���t ���current_timeR���(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/outdated.pyt���save$���s����(���t���__name__t ���__module__R���R'���(����(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/outdated.pyR ������s��� t���GlobalSelfCheckStatec�����������B@��s���e��Z�d����Z�d���Z�RS(���c���������C@��sw���t��j�j�t�d��|��_�y5�t�|��j�� �}�t�j�|��t�j �|��_ �Wd��QXWn#�t �t �t �f�k �rr�i��|��_ �n�Xd��S(���Ns���selfcheck.json(���R ���R ���R���R���R���R���R���R���R���R���R���R���R���t���KeyError(���R���R���(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/outdated.pyR���3���s ����#c���������C@��s���t��t�j�j�|��j���s�d��St�t�j�j�|��j���t�j�|��j���t�j�j�|��j��r�t �|��j���}�t �j �|��}�Wd��QXn�i��}�i�|�j �t ��d�6|�d�6|�t�j�<t �|��j�d��#�}�t �j�|�|�d�t�d�d�Wd��QXWd��QXd��S( ���NR���R���R���R���R���R ���R!���(���R ���R!���(���R ���R ���R ���t���dirnameR���R���R���t���LockFilet���existsR���R���R���R#���R$���R���R���R"���R%���(���R���R���R&���R���R���(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/outdated.pyR'���=���s����(���R(���R)���R���R'���(����(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/outdated.pyR*���2���s��� c�����������C@��s���t����r�t���St���Sd��S(���N(���R���R ���R*���(����(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/outdated.pyt���load_selfcheck_statefileX���s���� c����������C@��s]���d�d�l��}��y5�|��j�d��}�|�j�d��o?�d�|�j�d��k�SWn�|��j�k �rX�t�SXd�S(���s���Checks whether pip was installed by pip This is used not to display the upgrade message when pip is in fact installed by system package manager, such as dnf on Fedora. i����Nt���pipt ���INSTALLER(���t ���pkg_resourcest���get_distributiont ���has_metadatat���get_metadata_linest���DistributionNotFoundt���False(���R2���t���dist(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/outdated.pyt���pip_installed_by_pip_���s���� c��� ������C@��s��t��d��}�|�d�k�r�d�St�j�|��}�d�}�yyt���}�t�j�j���}�d�|�j�k�r�d�|�j�k�r�t�j�j�|�j�d�t ��}�t �|�|��d�k��r�|�j�d�}�q�n��|�d�k�rE|��j �t �j �d�i�d �d �6}�|�j���g��t�t�|�j���d ��d �t�j�D]�}�t�j�|��j�s |�^�q d �}�|�j�|�|��n��t�j�|��} �|�| �k��r|�j�| �j�k�rt���rt�rd�} �n�d�} �t�j�d�|�|�| ��n��Wn$�t�k �rt�j�d�d�t�n�Xd�S(���s���Check for an update for pip. Limit the frequency of checks to once per week. State is stored either in the active virtualenv or in the user's USER_CACHE_DIR keyed off the prefix of the pip script path. R0���NR���R���i���i���i<���t���headerss���application/jsont���Acceptt���releasest���keyis ���python -m pips���You are using pip version %s, however version %s is available. You should consider upgrading via the '%s install --upgrade pip' command.s5���There was an error checking the latest version of pipt���exc_infoi���i`'��i: �(���R ���t���Nonet���packaging_versiont���parseR/���t���datetimet���utcnowR���t���strptimeR$���R���t���getR���t ���pip_json_urlt���raise_for_statust���sortedt���listR���t ���is_prereleaseR'���t ���base_versionR9���R���t���loggert���warningt ���Exceptiont���debugR%���( ���t���sessiont���installed_versiont ���pip_versionR���R���R&���R���t���respt���vt���remote_versiont���pip_cmd(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/outdated.pyt���pip_version_checkn���sN����             ($���t ���__future__R����RB���R���t���loggingt���os.pathR ���R���t ���pip._vendorR���t���pip._vendor.packagingR���R@���t ���pip.compatR���R���t ���pip.modelsR���t ���pip.locationsR���R���t ���pip.utilsR���R ���t���pip.utils.filesystemR ���R$���t ���getLoggerR(���RL���t���objectR ���R*���R/���R9���RW���(����(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/outdated.pyt���<module>���s&���     &  PK�����!f[x �� ����filesystem.pyonu�[�������� abc�����������@���s5���d��d�l��Z��d��d�l�Z��d��d�l�m�Z�d���Z�d�S(���iN(���t ���get_path_uidc���������C���s���t��t�d��s�t�Sd��}�x�|��|�k�r�t�j�j�|���r�t�j���d�k�r{�y�t�|���}�Wn�t�k �rp�t �SX|�d�k�St�j �|��t�j ��Sq�|��t�j�j �|���}�}��q�Wd��S(���Nt���geteuidi����( ���t���hasattrt���ost���Truet���Nonet���patht���lexistsR���R����t���OSErrort���Falset���accesst���W_OKt���dirname(���R���t���previoust���path_uid(����(����s8���/usr/lib/python2.7/site-packages/pip/utils/filesystem.pyt���check_path_owner���s����  (���R���t���os.patht ���pip.compatR����R���(����(����(����s8���/usr/lib/python2.7/site-packages/pip/utils/filesystem.pyt���<module>���s���  PK�����!f[[׆ �� �� ��packaging.pycnu�[�������� abc�����������@@��s���d��d�l��m�Z�d��d�l�m�Z�d��d�l�Z�d��d�l�Z�d��d�l�m�Z�d��d�l�m�Z�d��d�l �m �Z �d��d�l �m �Z �e�j �e��Z�d���Z�d ���Z�d ���Z�d�S( ���i����(���t���absolute_import(���t ���FeedParserN(���t ���specifiers(���t���version(���t ���pkg_resources(���t ���exceptionsc���������C@��sQ���|��d�k�r�t�St�j�|���}�t�j�d�j�t�t�t �j �d� ���}�|�|�k�S(���sG�� Check if the python version in use match the `requires_python` specifier. Returns `True` if the version of python in use matches the requirement. Returns `False` if the version of python in use does not matches the requirement. Raises an InvalidSpecifier if `requires_python` have an invalid format. t���.i���N( ���t���Nonet���TrueR���t ���SpecifierSetR���t���parset���joint���mapt���strt���syst ���version_info(���t���requires_pythont���requires_python_specifiert���python_version(����(����s7���/usr/lib/python2.7/site-packages/pip/utils/packaging.pyt���check_requires_python���s ���� (c���������C@��sN���t��|��t�j��r.�|��j�d��r.�|��j�d��S|��j�d��rJ�|��j�d��Sd��S(���Nt���METADATAs���PKG-INFO(���t ���isinstanceR���t���DistInfoDistributiont ���has_metadatat ���get_metadata(���t���dist(����(����s7���/usr/lib/python2.7/site-packages/pip/utils/packaging.pyR���%���s ���� c������ ���C@��s���t��|���}�t���}�|�j�|��|�j���}�|�j�d��}�yK�t�|��s�t�j�d�|��j�|�d�j �t �t �t �j �d� ��f���n��Wn4�t�j�k �r�}�t�j�d�|��j�|�|�f��d��SXd��S(���Ns���Requires-Pythons4���%s requires Python '%s' but the running Python is %sR���i���s7���Package %s has an invalid Requires-Python entry %s - %s(���R���R���t���feedt���closet���getR���R���t���UnsupportedPythonVersiont ���project_nameR ���R ���R ���R���R���R���t���InvalidSpecifiert���loggert���warning(���R���t���metadatat ���feed_parsert ���pkg_info_dictR���t���e(����(����s7���/usr/lib/python2.7/site-packages/pip/utils/packaging.pyt���check_dist_requires_python-���s"����     -(���t ���__future__R����t ���email.parserR���t���loggingR���t���pip._vendor.packagingR���R���t ���pip._vendorR���t���pipR���t ���getLoggert���__name__R ���R���R���R&���(����(����(����s7���/usr/lib/python2.7/site-packages/pip/utils/packaging.pyt���<module>���s���    PK�����!f[8W���� ��build.pycnu�[�������� abc�����������@@��sR���d��d�l��m�Z�d��d�l�Z�d��d�l�Z�d��d�l�m�Z�d�e�f�d�����YZ�d�S(���i����(���t���absolute_importN(���t���rmtreet���BuildDirectoryc�����������B@��s;���e��Z�d�d�d���Z�d���Z�d���Z�d���Z�d���Z�RS(���c���������C@��sy���|�d��k�r!�|�d��k�r!�t�}�n��|�d��k�rc�t�j�j�t�j�d�d���}�|�d��k�rc�t�}�qc�n��|�|��_�|�|��_�d��S(���Nt���prefixs ���pip-build-( ���t���Nonet���Truet���ost���patht���realpatht���tempfilet���mkdtempt���namet���delete(���t���selfR ���R ���(����(����s3���/usr/lib/python2.7/site-packages/pip/utils/build.pyt���__init__ ���s����     c���������C@��s���d�j��|��j�j�|��j��S(���Ns ���<{} {!r}>(���t���formatt ���__class__t���__name__R ���(���R ���(����(����s3���/usr/lib/python2.7/site-packages/pip/utils/build.pyt���__repr__���s����c���������C@��s���|��j��S(���N(���R ���(���R ���(����(����s3���/usr/lib/python2.7/site-packages/pip/utils/build.pyt ���__enter__"���s����c���������C@��s���|��j����d��S(���N(���t���cleanup(���R ���t���exct���valuet���tb(����(����s3���/usr/lib/python2.7/site-packages/pip/utils/build.pyt���__exit__%���s����c���������C@��s���|��j��r�t�|��j��n��d��S(���N(���R ���R���R ���(���R ���(����(����s3���/usr/lib/python2.7/site-packages/pip/utils/build.pyR���(���s���� N(���R���t ���__module__R���R���R���R���R���R���(����(����(����s3���/usr/lib/python2.7/site-packages/pip/utils/build.pyR��� ���s ���   ( ���t ���__future__R����t���os.pathR���R ���t ���pip.utilsR���t���objectR���(����(����(����s3���/usr/lib/python2.7/site-packages/pip/utils/build.pyt���<module>���s���  PK�����!f[ze[��[����setuptools_build.pyonu�[�������� abc�����������@���s ���d��Z��d�S(���s���import setuptools, tokenize;__file__=%r;f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))N(���t���SETUPTOOLS_SHIM(����(����(����s>���/usr/lib/python2.7/site-packages/pip/utils/setuptools_build.pyt���<module>���t����PK�����!f['S���� ��encoding.pycnu�[�������� abc�����������@���s���d��d�l��Z��d��d�l�Z�d��d�l�Z�e��j�d�f�e��j�d�f�e��j�d�f�e��j�d�f�e��j�d�f�e��j�d�f�e��j �d�f�g�Z �e�j �d ��Z �d ���Z �d�S( ���iNt���utf8t���utf16s���utf16-bes���utf16-let���utf32s���utf32-bes���utf32-les���coding[:=]\s*([-\w.]+)c���������C���s���x:�t��D]2�\�}�}�|��j�|��r�|��t�|��j�|��Sq�Wxl�|��j�d��d� D]W�}�|�d�d�!d�k�rQ�t�j�|��rQ�t�j�|��j���d�j�d��}�|��j�|��SqQ�W|��j�t�j �t ���S(���s���Check a bytes string for a BOM to correctly detect the encoding Fallback to locale.getpreferredencoding(False) like open() on Python3s��� i���i����i���t���#t���ascii( ���t���BOMSt ���startswitht���lent���decodet���splitt ���ENCODING_REt���searcht���groupst���localet���getpreferredencodingt���False(���t���datat���bomt���encodingt���line(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/encoding.pyt ���auto_decode���s����""(���t���codecsR ���t���ret���BOM_UTF8t ���BOM_UTF16t ���BOM_UTF16_BEt ���BOM_UTF16_LEt ���BOM_UTF32t ���BOM_UTF32_BEt ���BOM_UTF32_LER���t���compileR ���R���(����(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/encoding.pyt���<module>���s���         PK�����!f[Ąl��l�� ��__init__.pyonu�[�������� abc�����������@@��s��d��d�l��m�Z�d��d�l�m�Z�d��d�l�Z�d��d�l�Z�d��d�l�Z�d��d�l�Z�d��d�l�Z �d��d�l �Z �d��d�l �Z �d��d�l �Z �d��d�l �Z �d��d�l�Z�d��d�l�Z�d��d�l�Z�d��d�l�Z�d��d�l�Z�d��d�l�m�Z�d��d�l�m�Z�m�Z�m�Z�d��d�l�m�Z�m�Z�m�Z�m�Z�m�Z�d��d�l�m �Z �d��d�l!�m"�Z"�d��d �l#�m$�Z$�d��d �l%�m&�Z&�e$�rud��d �l�m'�Z(�n�d��d �l�m(�Z(�d �d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d�d �d!�d"�d#�d$�g�Z)�e �j*�e+��Z,�df�Z-�dg�Z.�dh�Z/�di�Z0�e/�e-�e0�e.�Z1�e/�e0�Z2�y�d��d�l3�Z3�e2�e-�7Z2�Wn�e4�k �rPe,�j5�d1��n�Xy�d��d�l6�Z6�e2�e.�7Z2�Wn�e4�k �re,�j5�d2��n�Xd3���Z7�d4���Z8�d5���Z9�e&�d6�d7�d8�d9��e:�d:���Z;�d;���Z<�d<���Z=�d=�d>��Z>�d?���Z?�d@���Z@�dA���ZA�dB���ZB�dC���ZC�dD���ZD�e�jE�dE��ZF�dF���ZG�dG���ZH�eI�dH��ZJ�dI���ZK�dJ���ZL�dK���ZM�dL���ZN�dM���ZO�dN���ZP�dO���ZQ�eI�e�eI�e:�e:�dP��ZR�dQ���ZS�dR���ZT�dS���ZU�dT���ZV�eI�dU��ZW�dV���ZX�dW���ZY�eI�d�dX�d�d�d�dY��Z[�dZ���Z\�d[���Z]�d\�e^�f�d]�����YZ_�d^�e(�f�d_�����YZ`�e�ja�d`����Zb�da���Zc�db�e^�f�dc�����YZd�d�dd��Ze�de���Zf�d�S(j���i����(���t���absolute_import(���t���dequeN(���t���InstallationError(���t���console_to_strt ���expandusert ���stdlib_pkgs(���t ���site_packagest ���user_sitet���running_under_virtualenvt���virtualenv_no_globalt���write_delete_marker_file(���t ���pkg_resources(���t���input(���t���PY2(���t���retry(���t���BytesIO(���t���StringIOt���rmtreet ���display_patht ���backup_dirt���askt���splitextt ���format_sizet���is_installable_dirt ���is_svn_paget ���file_contentst���split_leading_dirt���has_leading_dirt���normalize_patht���renamest���get_terminal_sizet���get_progt ���unzip_filet ���untar_filet ���unpack_filet���call_subprocesst���captured_stdoutt ���ensure_dirt���ARCHIVE_EXTENSIONSt���SUPPORTED_EXTENSIONSt���get_installed_versions���.tar.bz2s���.tbzs���.tar.xzs���.txzs���.tlzs���.tar.lzs ���.tar.lzmas���.zips���.whls���.tar.gzs���.tgzs���.tars���bz2 module is not availables���lzma module is not availablec���������O@��s5���y�t��|���SWn �t�k �r0�|�|�|����n�Xd��S(���N(���t ���__import__t ���ImportError(���t���pkg_or_module_stringt ���ExceptionTypet���argst���kwargs(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyt���import_or_raiseI���s���� c���������C@��sC���y�t��j�|���Wn+�t�k �r>�}�|�j�t�j�k�r?���q?�n�Xd�S(���s ���os.path.makedirs without EEXIST.N(���t���ost���makedirst���OSErrort���errnot���EEXIST(���t���patht���e(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR%���P���s ����c�����������C@��sO���y.�t��j�j�t�j�d��d�k�r-�d�t�j�SWn�t�t�t�f�k �rJ�n�Xd�S(���Ni����s ���__main__.pys���-cs ���%s -m pipt���pip(���s ���__main__.pys���-c( ���R0���R5���t���basenamet���syst���argvt ���executablet���AttributeErrort ���TypeErrort ���IndexError(����(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR���Y���s ����t���stop_max_delayi ��t ���wait_fixedi��c���������C@��s���t��j�|��d�|�d�t�d��S(���Nt ���ignore_errorst���onerror(���t���shutilR���t���rmtree_errorhandler(���t���dirRA���(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR���c���s����c���������C@��sA���t��j�|��j�t�j�@r:�t��j�|�t�j��|��|��d�S��d�S(���s���On Windows, the files in .svn are read-only, so when rmtree() tries to remove them, an exception is thrown. We catch that here, remove the read-only attribute, and hopefully continue without problems.N(���R0���t���statt���st_modet���S_IREADt���chmodt���S_IWRITE(���t���funcR5���t���exc_info(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyRD���i���s ���� c���������C@��s���t��j�j�t��j�j�|����}��t�j�d�d�k�rd�|��j�t�j���d��}��|��j�t�j ���d��}��n��|��j �t��j ���t��j�j ��r�d�|��t �t��j ����}��n��|��S(���sT���Gives the display value for a given path, making it relative to cwd if possible.i����i���t���replacet���.(���R0���R5���t���normcaset���abspathR9���t ���version_infot���decodet���getfilesystemencodingt���encodet���getdefaultencodingt ���startswitht���getcwdt���sept���len(���R5���(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR���x���s����s���.bakc���������C@��sK���d�}�|�}�x4�t��j�j�|��|��rB�|�d�7}�|�t�|��}�q�W|��|�S(���s\���Figure out the name of a directory to back up the given dir to (adding .bak, .bak2, etc)i���(���R0���R5���t���existst���str(���RE���t���extt���nt ���extension(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR������s ���� c���������C@��sC���x3�t��j�j�d�d��j���D]�}�|�|�k�r�|�Sq�Wt�|��|��S(���Nt���PIP_EXISTS_ACTIONt����(���R0���t���environt���gett���splitR���(���t���messaget���optionst���action(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyt���ask_path_exists���s����" c���������C@��sy���xr�t��j�j�d��r(�t�d�|����n��t�|���}�|�j���j���}�|�|�k�rm�d�|�d�j�|��f�GHq�|�Sq�Wd�S(���s@���Ask the message interactively, with the given possible responsest ���PIP_NO_INPUTs7���No input was expected ($PIP_NO_INPUT set); question: %ss<���Your response (%r) was not one of the expected responses: %ss���, N(���R0���Ra���Rb���t ���ExceptionR ���t���stript���lowert���join(���Rd���Re���t���response(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR������s����   c���������C@��sX���|��d�k�r�d�|��d�d�S|��d �k�r4�d�|��d�S|��d�k�rL�d�|��d�Sd�|��Sd��S( ���Ni��s���%.1fMBg�����@@i ���s���%ikBs���%.1fkBs���%ibytesi@B�i'��(����(���t���bytes(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR������s����     c���������C@��sE���t��j�j�|���s�t�St��j�j�|��d��}�t��j�j�|��rA�t�St�S(���s@���Return True if `path` is a directory containing a setup.py file.s���setup.py(���R0���R5���t���isdirt���FalseRl���t���isfilet���True(���R5���t���setup_py(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR������s ����c���������C@��s(���t��j�d�|���o'�t��j�d�|��t��j��S(���sT��� Returns true if the page appears to be the index page of an svn repository s���<title>[^<]*Revision \d+:s#���Powered by (?:<a[^>]*?>)?Subversion(���t���ret���searcht���I(���t���html(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR������s����c���������C@��s/���t��|��d���}�|�j���j�d��SWd��QXd��S(���Nt���rbs���utf-8(���t���opent���readRR���(���t���filenamet���fp(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR������s����c���������c@��s/���x(�t��r*�|��j�|��}�|�s"�Pn��|�Vq�Wd�S(���s7���Yield pieces of data from a file-like object until EOF.N(���Rr���Rz���(���t���filet���sizet���chunk(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyt ���read_chunks���s ���� c���������C@��s���|��j��d��j��d��}��d�|��k�rj�d�|��k�rN�|��j�d��|��j�d��k��sZ�d�|��k�rj�|��j�d�d��Sd�|��k�r�|��j�d�d��S|��d�f�Sd��S(���Nt���/s���\i���R`���(���t���lstript���findRc���(���R5���(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR������s����6  c���������C@��s\���d�}�xO�|��D]G�}�t�|��\�}�}�|�s/�t�S|�d�k�rD�|�}�q �|�|�k�r �t�Sq �Wt�S(���sy���Returns true if all the paths have the same leading path name (i.e., everything is in one subdirectory in an archive)N(���t���NoneR���Rp���Rr���(���t���pathst ���common_prefixR5���t���prefixt���rest(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR������s����    c���������C@��sI���t��|���}��|�r'�t�j�j�|���}��n�t�j�j�|���}��t�j�j�|���S(���sN��� Convert a path to its canonical, case-normalized, absolute version. (���R���R0���R5���t���realpathRP���RO���(���R5���t���resolve_symlinks(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR������s ���� c���������C@��sO���t��j�|���\�}�}�|�j���j�d��rE�|�d�|�}�|�d� }�n��|�|�f�S(���s,���Like os.path.splitext, but take off .tar toos���.tari(���t ���posixpathR���Rk���t���endswith(���R5���t���baseR\���(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR������s ���� c���������C@��s���t��j�j�|��\�}�}�|�rG�|�rG�t��j�j�|�� rG�t��j�|��n��t�j�|��|��t��j�j�|���\�}�}�|�r�|�r�y�t��j�|��Wq�t�k �r�q�Xn��d�S(���s7���Like os.renames(), but handles renaming across devices.N( ���R0���R5���Rc���RZ���R1���RC���t���movet ���removedirsR2���(���t���oldt���newt���headt���tail(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR�����s����  c���������C@��s)���t����s �t�St�|���j�t�t�j���S(���s��� Return True if path is within sys.prefix, if we're running in a virtualenv. If we're not in a virtualenv, all paths are considered "local." (���R���Rr���R���RV���R9���R���(���R5���(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyt���is_local��s���� c���������C@��s���t��t�|����S(���s��� Return True if given Distribution object is installed locally (i.e. within current virtualenv). Always True if we're not in a virtualenv. (���R���t ���dist_location(���t���dist(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyt ���dist_is_local!��s����c���������C@��s%���t��t�|����}�|�j�t��t���S(���sF��� Return True if given Distribution is installed in user site. (���R���R���RV���R���(���R���t ���norm_path(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyt���dist_in_usersite,��s����c���������C@��s���t��t�|����j�t��t���S(���se��� Return True if given Distribution is installed in distutils.sysconfig.get_python_lib(). (���R���R���RV���R���(���R���(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyt���dist_in_site_packages4��s����c���������C@��sJ���xC�t��j�D]8�}�t�j�j�|�|��j�d��}�t�j�j�|��r �t�Sq �Wt�S(���s$���Is distribution an editable install?s ���.egg-link(���R9���R5���R0���Rl���t ���project_nameRq���Rr���Rp���(���R���t ���path_itemt���egg_link(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyt���dist_is_editable>��s ����c��� ������C@��s���|��r�t��}�n �d���}�|�r*�d���}�n �d���}�|�rE�d���}�n �d���}�|�r]�t�}�n �d���}�g��t�j�D]K�} �|�| ��rp�| �j�|�k�rp�|�| ��rp�|�| ��rp�|�| ��rp�| �^�qp�S(���s�� Return a list of installed Distribution objects. If ``local_only`` is True (default), only return installations local to the current virtualenv, if in a virtualenv. ``skip`` argument is an iterable of lower-case project names to ignore; defaults to stdlib_pkgs If ``editables`` is False, don't report editables. If ``editables_only`` is True , only report editables. If ``user_only`` is True , only report installations in the user site directory. c���������S@��s���t��S(���N(���Rr���(���t���d(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyt ���local_test`��s����c���������S@��s���t��S(���N(���Rr���(���R���(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyt ���editable_testd��s����c���������S@��s ���t��|��� S(���N(���R���(���R���(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR���g��s����c���������S@��s ���t��|���S(���N(���R���(���R���(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyt���editables_only_testk��s����c���������S@��s���t��S(���N(���Rr���(���R���(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR���n��s����c���������S@��s���t��S(���N(���Rr���(���R���(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyt ���user_testt��s����(���R���R���R ���t ���working_sett���key( ���t ���local_onlyt���skipt���include_editablest���editables_onlyt ���user_onlyR���R���R���R���R���(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyt���get_installed_distributionsG��s$����           c���������C@��s���g��}�t����rN�t���r(�|�j�t��qq�|�j�t��t�rq�|�j�t��qq�n#�t�rd�|�j�t��n��|�j�t��x@�|�D]8�}�t�j�j�|�|��j��d�}�t�j�j �|��rx�|�Sqx�Wd�S(���s�� Return the path for the .egg-link file if it exists, otherwise, None. There's 3 scenarios: 1) not in a virtualenv try to find in site.USER_SITE, then site_packages 2) in a no-global virtualenv try to find in site_packages 3) in a yes-global virtualenv try to find in site_packages, then site.USER_SITE (don't look in global location) For #1 and #3, there could be odd cases, where there's an egg-link in 2 locations. This method will just return the first one found. s ���.egg-linkN( ���R���R ���t���appendR���R���R0���R5���Rl���R���Rq���(���R���t���sitest���sitet���egglink(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyt ���egg_link_path��s����     c���������C@��s���t��|���}�|�r�|�S|��j�S(���s��� Get the site-packages location of this distribution. Generally this is dist.location, except in the case of develop-installed packages, where dist.location is the source code location, and we want to know where the egg-link file is. (���R���t���location(���R���R���(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR�����s���� c����������C@��s���d���}��|��d��p*�|��d��p*�|��d��}�|�sx�y8�t��j�t��j���t��j��}�|��|��}�t��j�|��Wqx�qx�Xn��|�s�t��j�j�d�d��t��j�j�d�d��f�}�n��t�|�d��t�|�d��f�S( ���sl���Returns a tuple (x, y) representing the width(x) and the height(x) in characters of the terminal window.c���������S@��sk���yL�d�d��l��}�d�d��l�}�d�d��l�}�|�j�d�|�j�|��|�j�d���}�Wn�d��SX|�d�k�rg�d��S|�S(���Ni����t���hht���1234(���i����i����(���t���fcntlt���termiost���structt���unpackt���ioctlt ���TIOCGWINSZR���(���t���fdR���R���R���t���cr(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyt ���ioctl_GWINSZ��s����    i����i���i���t���LINESi���t���COLUMNSiP���(���R0���Ry���t���ctermidt���O_RDONLYt���closeRa���Rb���t���int(���R���R���R���(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR�����s���� $ -c����������C@��s ���t��j�d��}��t��j�|���|��S(���sB���Get the current umask which involves having to set it temporarily.i����(���R0���t���umask(���t���mask(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyt ���current_umask��s���� c��� ������C@��s~��t��|��t�|��d��}�zSt�j�|�d�t�}�t�|�j����oF�|�}�x|�j���D]}�|�j�}�|�j �|��}�|�} �|�r�t �|��d�} �n��t �j �j �|�| ��} �t �j �j�| ��} �| �j�d��s�| �j�d��r�t��| ��qV�t��| ��t�| �d��} �z�| �j�|��Wd�| �j���|�j�d�?} �| �rft�j�| ��rf| �d �@rft �j�| �d �t���d �B�n��XqV�WWd�|�j���Xd�S( ���s�� Unzip the file (with path `filename`) to the destination `location`. All files are written based on system defaults and umask (i.e. permissions are not preserved), except that regular file members with any execute permissions (user, group, or world) have "chmod +x" applied after being written. Note that for windows, any execute changes using os.chmod are no-ops per the python docs. Rx���t ���allowZip64i���R���s���\t���wbNi���iI���i��(���R%���Ry���t���zipfilet���ZipFileRr���R���t���namelistt���infolistR{���Rz���R���R0���R5���Rl���t���dirnameR���t���writeR���t ���external_attrRF���t���S_ISREGRI���R���( ���R{���R���t���flattent���zipfpt���zipt���leadingt���infot���namet���datat���fnRE���R|���t���mode(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR �����s0����      'c��� ������C@��s��t��|��|��j���j�d��s4�|��j���j�d��r=�d�}�np�|��j���j�t��r[�d�}�nR�|��j���j�t��ry�d�}�n4�|��j���j�d��r�d�}�n�t�j�d�|���d �}�t�j�|��|��}�zt �g��|�j ���D]�}�|�j �d �k�r�|�j �^�q��}�x|�j ���D]}�|�j �}�|�d �k�r'qn��|�r@t �|��d �}�n��t �j�j�|�|��}�|�j���rnt��|��q|�j���ry�|�j�|�|��Wqt�k �r}�t�j�d �|��|�j �|��qqXqy�|�j�|��} �Wn5�t�t�f�k �r }�t�j�d �|��|�j �|��qn�Xt��t �j�j�|���t�|�d ���} �t�j�| �| ��Wd�QX| �j���|�j�|�|��|�j�d�@rt �j�|�d�t���d�B�qqWWd�|�j���Xd�S(���s�� Untar the file (with path `filename`) to the destination `location`. All files are written based on system defaults and umask (i.e. permissions are not preserved), except that regular file members with any execute permissions (user, group, or world) have "chmod +x" applied after being written. Note that for windows, any execute changes using os.chmod are no-ops per the python docs. s���.gzs���.tgzs���r:gzs���r:bz2s���r:xzs���.tart���rs-���Cannot determine compression type for file %ss���r:*t���pax_global_headeri���s/���In the tar file %s the member %s is invalid: %sR���NiI���i��(���R%���Rk���R���t���BZ2_EXTENSIONSt ���XZ_EXTENSIONSt���loggert���warningt���tarfileRy���R���t ���getmembersR���R���R0���R5���Rl���Ro���t���issymt���_extract_memberRi���t ���extractfilet���KeyErrorR<���R���RC���t ���copyfileobjR���t���utimeR���RI���R���( ���R{���R���R���t���tart���memberR���R���R5���t���excR|���t���destfp(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR!�����sb���� *     !        &c���������C@��s(��t��j�j�|���}��|�d�k�sB�|��j���j�t��sB�t�j�|���rb�t�|��|�d�|��j�d�� n�|�d�k�s�t �j �|���s�|��j���j�t �t �t ��r�t�|��|��nz�|�r�|�j�d��r�t�t�|����r�d�d�l�m�}�|�d�|�j��j�|��n&�t�j�d �|��|�|��t�d �|���d��S( ���Ns���application/zipR���s���.whls���application/x-gzips ���text/htmli����(���t ���Subversions���svn+sZ���Cannot unpack file %s (downloaded from %s, content-type: %s); cannot detect archive formats%���Cannot determine archive format of %s(���R0���R5���R���Rk���R���t���ZIP_EXTENSIONSR���t ���is_zipfileR ���R���t ���is_tarfilet���TAR_EXTENSIONSR���R���R!���RV���R���R���t���pip.vcs.subversionR���t���urlR���R���t���criticalR���(���R{���R���t ���content_typet���linkR���(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR"���O��s,����    t���raisec������ ���C@��s��|�r�d��}�n �t�j�}�|�d��k�r�g��}�xd�|��D]\�} �d�| �k�sg�d�| �k�sg�d�| �k�sg�d�| �k�r�d�| �j�d�d��} �n��|�j�| ��q1�Wd�j�|��}�n��t�j�d�|��t�j �j ���} �|�r�| �j �|��n��y4�t�j �|��d�t�j �d �d��d �|�d �|�d �| �} �Wn)�t�k �r7} �t�j�d �| �|����n�X|�d��k �rg��} �x�t�rt�| �j�j����}�|�srPn��|�j���}�| �j�|�d��t�j���t�j�k�rt�j�|��qM|�d��k �rM|�j���qMqMWn��| �j���|�d��k �r| �j�r|�j�d��q|�j�d��n��| �j�r|�d�k�rt�j���t�j�k�rq|� rqt�j�d�|��t�j�d�j�| ��d��n��t�d�|�| �j�|�f���q|�d�k�rt�j�d�|�| �j�|��q|�d�k�rqt�d�t �|����n��|�sd�j�| ��Sd��S(���Nt��� s��� t���"t���'s���"%s"s���\"s���Running command %st���stderrt���stdint���stdoutt���cwdt���envs#���Error %s while executing command %st���errort���doneR���s ���Complete output from command %s:R`���s)��� ----------------------------------------s,���Command "%s" failed with error code %s in %st���warns$���Command "%s" had error code %s in %st���ignores���Invalid value: on_returncode=%s(!���R���t ���subprocesst���PIPERM���R���Rl���R���t���debugR0���Ra���t���copyt���updatet���Popent���STDOUTRi���R���Rr���R���R���t���readlinet���rstript���getEffectiveLevelt ���std_loggingt���DEBUGt���spint���waitt ���returncodet���finishR���R���R���t ���ValueErrort���repr(���t���cmdt ���show_stdoutR���t ���on_returncodet ���command_desct ���extra_environt���spinnerR���t ���cmd_partst���partR���t���procR���t ���all_outputt���line(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR#���p��sz����    0               c���������C@��s|���t��|��d���}�|�j���}�Wd�QXd�t�j�t��d�g�}�x9�|�D]1�}�y�|�j�|��}�Wn�t�k �rr�qC�n�XPqC�W|�S(���sR��Return the contents of *filename*. Try to decode the file contents with utf-8, the preferred system encoding (e.g., cp1252 on some Windows machines), and latin1, in that order. Decoding a byte string with latin1 will never raise an error. In the worst case, the returned string will contain some garbage characters. Rx���Ns���utf-8t���latin1(���Ry���Rz���t���localet���getpreferredencodingRp���RR���t���UnicodeDecodeError(���R{���R|���R���t ���encodingst���enc(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyt���read_text_file��s����   c���������C@��s���t��j�|���t�|���d��S(���N(���R0���R1���R ���(���t ���build_dir(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyt���_make_build_dir��s���� t���FakeFilec�����������B@��s)���e��Z�d��Z�d���Z�d���Z�d���Z�RS(���sQ���Wrap a list of lines in an object with readline() to make ConfigParser happy.c���������C@��s���d���|�D�|��_��d��S(���Nc���������s@��s���|��] �}�|�Vq�d��S(���N(����(���t���.0t���l(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pys ���<genexpr>��s����(���t���_gen(���t���selft���lines(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyt���__init__��s����c���������C@��sL���y3�y�t��|��j��SWn�t�k �r1�|��j�j����SXWn�t�k �rG�d�SXd��S(���NR`���(���t���nextR+��t ���NameErrort ���StopIteration(���R,��(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR ����s����  c���������C@��s���|��j��S(���N(���R+��(���R,��(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyt���__iter__��s����(���t���__name__t ���__module__t���__doc__R.��R ��R2��(����(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR(����s���  t ���StreamWrapperc�����������B@��s&���e��Z�e�d�����Z�e�d����Z�RS(���c���������C@��s���|�|��_��|����S(���N(���t ���orig_stream(���t���clsR7��(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyt ���from_stream��s���� c���������C@��s ���|��j��j�S(���N(���R7��t���encoding(���R,��(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR:�� ��s����(���R3��R4��t ���classmethodR9��t���propertyR:��(����(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR6����s���c���������c@��sR���t��t�|���}�t�t�|��t�j�|���z�t��t�|���VWd�t�t�|��|��Xd�S(���s���Return a context manager used by captured_stdout/stdin/stderr that temporarily replaces the sys stream *stream_name* with a StringIO. Taken from Lib/support/__init__.py in the CPython repo. N(���t���getattrR9���t���setattrR6��R9��(���t ���stream_namet ���orig_stdout(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyt���captured_output��s ����c�����������C@��s ���t��d��S(���s���Capture the output of sys.stdout: with captured_stdout() as stdout: print('hello') self.assertEqual(stdout.getvalue(), 'hello ') Taken from Lib/support/__init__.py in the CPython repo. R���(���RA��(����(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR$�����s���� t���cached_propertyc�����������B@��s ���e��Z�d��Z�d���Z�d���Z�RS(���s���A property that is only computed once per instance and then replaces itself with an ordinary attribute. Deleting the attribute resets the property. Source: https://github.com/bottlepy/bottle/blob/0.11.5/bottle.py#L175 c���������C@��s���t��|�d��|��_�|�|��_�d��S(���NR5��(���R=��R5��RK���(���R,��RK���(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR.��2��s����c���������C@��s4���|�d��k�r�|��S|��j�|��}�|�j�|��j�j�<|�S(���N(���R���RK���t���__dict__R3��(���R,��t���objR8��t���value(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyt���__get__6��s����  (���R3��R4��R5��R.��RF��(����(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyRB��*��s��� c���������C@��s\���t��j�j�|���}�|�d�k�r-�t��j���}�n�t��j�|��}�|�j�|��}�|�rX�|�j�Sd�S(���sC���Get the installed version of dist_name avoiding pkg_resources cacheN(���R ���t ���Requirementt���parseR���t ���WorkingSetR���t���version(���t ���dist_namet ���lookup_dirst���reqR���R���(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyR(���>��s ���� c���������C@��s���t��|��d�d�d�S(���s���Consume an iterable at C speed.t���maxleni����N(���R���(���t���iterator(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyt���consumeR��s����(���s���.tar.bz2s���.tbz(���s���.tar.xzs���.txzs���.tlzs���.tar.lzs ���.tar.lzma(���s���.zips���.whl(���s���.tar.gzs���.tgzs���.tar(g���t ���__future__R����t ���collectionsR���t ���contextlibR3���t���ioR ��t���loggingR ��Rt���R0���R���RC���RF���R��R9���R���R���t���pip.exceptionsR���t ���pip.compatR���R���R���t ���pip.locationsR���R���R���R ���R ���t ���pip._vendorR ���t���pip._vendor.six.movesR ���t���pip._vendor.sixR ���t���pip._vendor.retryingR���R���R���t���__all__t ���getLoggerR3��R���R���R���R���R���R&���R'���t���bz2R*���R��t���lzmaR/���R%���R���Rp���R���RD���R���R���Rg���R���R���R���R���R���t���DEFAULT_BUFFER_SIZER���R���R���Rr���R���R���R���R���R���R���R���R���R���R���R���R���R���R ���R!���R"���R���R#���R%��R'��t���objectR(��R6��t���contextmanagerRA��R$���RB��R(���RP��(����(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/__init__.pyt���<module>���s���              (                     5 %    + L !_     PK�����!f[[׆ �� �� ��packaging.pyonu�[�������� abc�����������@@��s���d��d�l��m�Z�d��d�l�m�Z�d��d�l�Z�d��d�l�Z�d��d�l�m�Z�d��d�l�m�Z�d��d�l �m �Z �d��d�l �m �Z �e�j �e��Z�d���Z�d ���Z�d ���Z�d�S( ���i����(���t���absolute_import(���t ���FeedParserN(���t ���specifiers(���t���version(���t ���pkg_resources(���t ���exceptionsc���������C@��sQ���|��d�k�r�t�St�j�|���}�t�j�d�j�t�t�t �j �d� ���}�|�|�k�S(���sG�� Check if the python version in use match the `requires_python` specifier. Returns `True` if the version of python in use matches the requirement. Returns `False` if the version of python in use does not matches the requirement. Raises an InvalidSpecifier if `requires_python` have an invalid format. t���.i���N( ���t���Nonet���TrueR���t ���SpecifierSetR���t���parset���joint���mapt���strt���syst ���version_info(���t���requires_pythont���requires_python_specifiert���python_version(����(����s7���/usr/lib/python2.7/site-packages/pip/utils/packaging.pyt���check_requires_python���s ���� (c���������C@��sN���t��|��t�j��r.�|��j�d��r.�|��j�d��S|��j�d��rJ�|��j�d��Sd��S(���Nt���METADATAs���PKG-INFO(���t ���isinstanceR���t���DistInfoDistributiont ���has_metadatat ���get_metadata(���t���dist(����(����s7���/usr/lib/python2.7/site-packages/pip/utils/packaging.pyR���%���s ���� c������ ���C@��s���t��|���}�t���}�|�j�|��|�j���}�|�j�d��}�yK�t�|��s�t�j�d�|��j�|�d�j �t �t �t �j �d� ��f���n��Wn4�t�j�k �r�}�t�j�d�|��j�|�|�f��d��SXd��S(���Ns���Requires-Pythons4���%s requires Python '%s' but the running Python is %sR���i���s7���Package %s has an invalid Requires-Python entry %s - %s(���R���R���t���feedt���closet���getR���R���t���UnsupportedPythonVersiont ���project_nameR ���R ���R ���R���R���R���t���InvalidSpecifiert���loggert���warning(���R���t���metadatat ���feed_parsert ���pkg_info_dictR���t���e(����(����s7���/usr/lib/python2.7/site-packages/pip/utils/packaging.pyt���check_dist_requires_python-���s"����     -(���t ���__future__R����t ���email.parserR���t���loggingR���t���pip._vendor.packagingR���R���t ���pip._vendorR���t���pipR���t ���getLoggert���__name__R ���R���R���R&���(����(����(����s7���/usr/lib/python2.7/site-packages/pip/utils/packaging.pyt���<module>���s���    PK�����!f[\"��"�� ��glibc.pycnu�[�������� abc�����������@@��sh���d��d�l��m�Z�d��d�l�Z�d��d�l�Z�d��d�l�Z�d��d�l�Z�d���Z�d���Z�d���Z�d���Z �d�S(���i����(���t���absolute_importNc����������C@��sk���t��j�d��}��y �|��j�}�Wn�t�k �r0�d�SXt��j�|�_�|���}�t�|�t��sg�|�j �d��}�n��|�S(���s9���Returns glibc version string, or None if not using glibc.t���asciiN( ���t���ctypest���CDLLt���Nonet���gnu_get_libc_versiont���AttributeErrort���c_char_pt���restypet ���isinstancet���strt���decode(���t���process_namespaceR���t ���version_str(����(����s3���/usr/lib/python2.7/site-packages/pip/utils/glibc.pyt���glibc_version_string ���s����    c���������C@��sd���t��j�d�|���}�|�s0�t�j�d�|��t��t�St�|�j�d���|�k�oc�t�|�j�d���|�k�S(���Ns$���(?P<major>[0-9]+)\.(?P<minor>[0-9]+)s=���Expected glibc version with 2 components major.minor, got: %st���majort���minor(���t���ret���matcht���warningst���warnt���RuntimeWarningt���Falset���intt���group(���R ���t���required_majort ���minimum_minort���m(����(����s3���/usr/lib/python2.7/site-packages/pip/utils/glibc.pyt���check_glibc_version#���s����  c���������C@��s)���t����}�|�d��k�r�t�St�|�|��|��S(���N(���R���R���R���R���(���R���R���R ���(����(����s3���/usr/lib/python2.7/site-packages/pip/utils/glibc.pyt���have_compatible_glibc3���s����  c����������C@��s-���t����}��|��d��k�r�t�j���Sd�|��f�Sd��S(���Nt���glibc(���R���R���t���platformt���libc_ver(���t ���glibc_version(����(����s3���/usr/lib/python2.7/site-packages/pip/utils/glibc.pyR ���K���s����   ( ���t ���__future__R����R���R���R���R���R���R���R���R ���(����(����(����s3���/usr/lib/python2.7/site-packages/pip/utils/glibc.pyt���<module>���s���       PK�����!f[3z���� ��logging.pycnu�[�������� abc�����������@@��se��d��d�l��m�Z�d��d�l�Z�d��d�l�Z�d��d�l�Z�d��d�l�Z�y�d��d�l�Z�Wn�e�k �ro�d��d�l�Z�n�Xd��d�l �m �Z �d��d�l �m �Z �y�d��d�l �m�Z�Wn�e�k �r�d�Z�n�Xe�j���Z�d��e�_�e�j�d�d���Z�d���Z�d �e�j�f�d �����YZ�d ���Z�d �e�j�f�d �����YZ�d�e�j�j�f�d�����YZ�d�e�j�f�d�����YZ �d�S(���i����(���t���absolute_importN(���t���WINDOWS(���t ���ensure_dir(���t���coloramai���c���������c@��s/���t��j�|��7_�z �d�VWd�t��j�|��8_�Xd�S(���sv��� A context manager which will cause the log output to be indented for any log messages emitted inside it. N(���t ���_log_statet ���indentation(���t���num(����(����s5���/usr/lib/python2.7/site-packages/pip/utils/logging.pyt ���indent_log���s���� c�����������C@��s���t��t�d�d��S(���NR���i����(���t���getattrR���(����(����(����s5���/usr/lib/python2.7/site-packages/pip/utils/logging.pyt���get_indentation)���s����t���IndentingFormatterc�����������B@��s���e��Z�d����Z�RS(���c���������C@��sO���t��j�j�|��|��}�d�j�g��|�j�t��D]�}�d�t���|�^�q+��}�|�S(���s��� Calls the standard formatter, but will indent all of the log messages by our current indentation level. t����t��� (���t���loggingt ���Formattert���formatt���joint ���splitlinest���TrueR ���(���t���selft���recordt ���formattedt���line(����(����s5���/usr/lib/python2.7/site-packages/pip/utils/logging.pyR���/���s ����-(���t���__name__t ���__module__R���(����(����(����s5���/usr/lib/python2.7/site-packages/pip/utils/logging.pyR ���-���s���c����������@��s�����f�d���}�|�S(���Nc���������@��s#���d�j��t����|��t�j�j�g��S(���NR ���(���R���t���listR���t���Stylet ���RESET_ALL(���t���inp(���t���colors(����s5���/usr/lib/python2.7/site-packages/pip/utils/logging.pyt���wrapped=���s����(����(���R���R���(����(���R���s5���/usr/lib/python2.7/site-packages/pip/utils/logging.pyt ���_color_wrap<���s����t���ColorizedStreamHandlerc�����������B@��sk���e��Z�e�rE�e�j�e�e�j�j��f�e�j�e�e�j�j ��f�g�Z �n�g��Z �d�d���Z �d���Z �d���Z�RS(���c���������C@��s;���t��j�j�|��|��t�r7�t�r7�t�j�|��j��|��_�n��d��S(���N(���R ���t ���StreamHandlert���__init__R���R���t ���AnsiToWin32t���stream(���R���R$���(����(����s5���/usr/lib/python2.7/site-packages/pip/utils/logging.pyR"���N���s���� c���������C@��ss���t��s �t�St�|��j�t��j��s(�|��j�n �|��j�j�}�t�|�d��rS�|�j���rS�t�St �j �j �d��d�k�ro�t�St�S(���Nt���isattyt���TERMt���ANSI( ���R���t���Falset ���isinstanceR$���R#���R���t���hasattrR%���R���t���ost���environt���get(���R���t ���real_stream(����(����s5���/usr/lib/python2.7/site-packages/pip/utils/logging.pyt ���should_colorT���s���� c���������C@��sa���t��j�j�|��|��}�|��j���r]�x9�|��j�D]+�\�}�}�|�j�|�k�r+�|�|��}�Pq+�q+�Wn��|�S(���N(���R ���R!���R���R/���t���COLORSt���levelno(���R���R���t���msgt���levelt���color(����(����s5���/usr/lib/python2.7/site-packages/pip/utils/logging.pyR���i���s����   N(���R���R���R���R ���t���ERRORR���t���Foret���REDt���WARNINGt���YELLOWR0���t���NoneR"���R/���R���(����(����(����s5���/usr/lib/python2.7/site-packages/pip/utils/logging.pyR ���B���s���!  t���BetterRotatingFileHandlerc�����������B@��s���e��Z�d����Z�RS(���c���������C@��s,���t��t�j�j�|��j���t�j�j�j�|���S(���N( ���R���R+���t���patht���dirnamet ���baseFilenameR ���t���handlerst���RotatingFileHandlert���_open(���R���(����(����s5���/usr/lib/python2.7/site-packages/pip/utils/logging.pyRA���w���s����(���R���R���RA���(����(����(����s5���/usr/lib/python2.7/site-packages/pip/utils/logging.pyR;���u���s���t���MaxLevelFilterc�����������B@��s���e��Z�d����Z�d���Z�RS(���c���������C@��s ���|�|��_��d��S(���N(���R3���(���R���R3���(����(����s5���/usr/lib/python2.7/site-packages/pip/utils/logging.pyR"���~���s����c���������C@��s���|�j��|��j�k��S(���N(���R1���R3���(���R���R���(����(����s5���/usr/lib/python2.7/site-packages/pip/utils/logging.pyt���filter���s����(���R���R���R"���RC���(����(����(����s5���/usr/lib/python2.7/site-packages/pip/utils/logging.pyRB���|���s��� (!���t ���__future__R����t ���contextlibR ���t���logging.handlersR+���t ���threadingt ���ImportErrort���dummy_threadingt ���pip.compatR���t ���pip.utilsR���t ���pip._vendorR���t ���ExceptionR:���t���localR���R���t���contextmanagerR���R ���R���R ���R���R!���R ���R?���R@���R;���t���FilterRB���(����(����(����s5���/usr/lib/python2.7/site-packages/pip/utils/logging.pyt���<module>���s0���           3PK�����!f[S �� ����deprecation.pycnu�[�������� abc�����������@@��s���d��Z��d�d�l�m�Z�d�d�l�Z�d�d�l�Z�d�e�f�d�����YZ�d�e�f�d�����YZ�d�e�f�d �����YZ �d �e�e�f�d �����YZ �d �e�f�d �����YZ �d�a �d�d�d��Z�d���Z�d�S(���sN��� A module that implements tooling to enable easy warnings about deprecations. i����(���t���absolute_importNt���PipDeprecationWarningc�����������B@��s���e��Z�RS(����(���t���__name__t ���__module__(����(����(����s9���/usr/lib/python2.7/site-packages/pip/utils/deprecation.pyR��� ���s���t���Pendingc�����������B@��s���e��Z�RS(����(���R���R���(����(����(����s9���/usr/lib/python2.7/site-packages/pip/utils/deprecation.pyR������s���t���RemovedInPip10Warningc�����������B@��s���e��Z�RS(����(���R���R���(����(����(����s9���/usr/lib/python2.7/site-packages/pip/utils/deprecation.pyR������s���t���RemovedInPip11Warningc�����������B@��s���e��Z�RS(����(���R���R���(����(����(����s9���/usr/lib/python2.7/site-packages/pip/utils/deprecation.pyR������s���t���Python26DeprecationWarningc�����������B@��s���e��Z�RS(����(���R���R���(����(����(����s9���/usr/lib/python2.7/site-packages/pip/utils/deprecation.pyR������s���c���������C@��s���|�d��k �r7�t�d��k �r�t�|��|�|�|�|�|��q�np�t�|�t��r�t�j�d��}�d�|��}�t�|�t��r~�|�j�|��q�|�j�|��n�t�|��|�|�|�|�|��d��S(���Ns���pip.deprecationss���DEPRECATION: %s( ���t���Nonet���_warnings_showwarningt ���issubclassR���t���loggingt ���getLoggerR���t���warningt���error(���t���messaget���categoryt���filenamet���linenot���filet���linet���loggert ���log_message(����(����s9���/usr/lib/python2.7/site-packages/pip/utils/deprecation.pyt ���_showwarning$���s����   c�����������C@��s;���t��j�d�t�d�t�t�d��k�r7�t��j�a�t�t��_�n��d��S(���Nt���defaultt���append(���t���warningst ���simplefilterR���t���TrueR ���R���t ���showwarningR���(����(����(����s9���/usr/lib/python2.7/site-packages/pip/utils/deprecation.pyt���install_warning_loggerD���s����  (���t���__doc__t ���__future__R����R ���R���t���WarningR���t���objectR���R���R���R���R���R ���R���R���(����(����(����s9���/usr/lib/python2.7/site-packages/pip/utils/deprecation.pyt���<module>���s���   PK�����!f[ze[��[����setuptools_build.pycnu�[�������� abc�����������@���s ���d��Z��d�S(���s���import setuptools, tokenize;__file__=%r;f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))N(���t���SETUPTOOLS_SHIM(����(����(����s>���/usr/lib/python2.7/site-packages/pip/utils/setuptools_build.pyt���<module>���t����PK�����!f['S���� ��encoding.pyonu�[�������� abc�����������@���s���d��d�l��Z��d��d�l�Z�d��d�l�Z�e��j�d�f�e��j�d�f�e��j�d�f�e��j�d�f�e��j�d�f�e��j�d�f�e��j �d�f�g�Z �e�j �d ��Z �d ���Z �d�S( ���iNt���utf8t���utf16s���utf16-bes���utf16-let���utf32s���utf32-bes���utf32-les���coding[:=]\s*([-\w.]+)c���������C���s���x:�t��D]2�\�}�}�|��j�|��r�|��t�|��j�|��Sq�Wxl�|��j�d��d� D]W�}�|�d�d�!d�k�rQ�t�j�|��rQ�t�j�|��j���d�j�d��}�|��j�|��SqQ�W|��j�t�j �t ���S(���s���Check a bytes string for a BOM to correctly detect the encoding Fallback to locale.getpreferredencoding(False) like open() on Python3s��� i���i����i���t���#t���ascii( ���t���BOMSt ���startswitht���lent���decodet���splitt ���ENCODING_REt���searcht���groupst���localet���getpreferredencodingt���False(���t���datat���bomt���encodingt���line(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/encoding.pyt ���auto_decode���s����""(���t���codecsR ���t���ret���BOM_UTF8t ���BOM_UTF16t ���BOM_UTF16_BEt ���BOM_UTF16_LEt ���BOM_UTF32t ���BOM_UTF32_BEt ���BOM_UTF32_LER���t���compileR ���R���(����(����(����s6���/usr/lib/python2.7/site-packages/pip/utils/encoding.pyt���<module>���s���         PK�����!f[KHy��y�� ��hashes.pyonu�[�������� abc�����������@@��s���d��d�l��m�Z�d��d�l�Z�d��d�l�m�Z�m�Z�m�Z�d��d�l�m�Z�d��d�l �m �Z �m �Z �m �Z �d�Z �d�d�d�g�Z�d �e�f�d �����YZ�d �e�f�d �����YZ�d�S( ���i����(���t���absolute_importN(���t ���HashMismatcht ���HashMissingt���InstallationError(���t ���read_chunks(���t ���iteritemst���iterkeyst ���itervaluest���sha256t���sha384t���sha512t���Hashesc�����������B@��sP���e��Z�d��Z�d�d��Z�d���Z�d���Z�d���Z�d���Z�d���Z �d���Z �RS( ���sa���A wrapper that builds multiple hashes at once and checks them against known-good values c���������C@��s���|�d�k�r�i��n�|�|��_�d�S(���so��� :param hashes: A dict of algorithm names pointing to lists of allowed hex digests N(���t���Nonet���_allowed(���t���selft���hashes(����(����s4���/usr/lib/python2.7/site-packages/pip/utils/hashes.pyt���__init__���s����c���������C@��s���i��}�xX�t��|��j��D]G�}�y�t�j�|��|�|�<Wq�t�t�f�k �r\�t�d�|���q�Xq�Wx2�|�D]*�}�x!�t�|��D]�}�|�j�|��q{�Wqh�Wx7�t �|��D])�\�}�}�|�j ���|��j�|�k�r�d�Sq�W|��j �|��d�S(���s���Check good hashes against ones built from iterable of chunks of data. Raise HashMismatch if none match. s���Unknown hash name: %sN( ���R���R ���t���hashlibt���newt ���ValueErrort ���TypeErrorR���R���t���updateR���t ���hexdigestt���_raise(���R���t���chunkst���gotst ���hash_namet���chunkt���hasht���got(����(����s4���/usr/lib/python2.7/site-packages/pip/utils/hashes.pyt���check_against_chunks ���s���� c���������C@��s���t��|��j�|���d��S(���N(���R���R ���(���R���R���(����(����s4���/usr/lib/python2.7/site-packages/pip/utils/hashes.pyR���7���s����c���������C@��s���|��j��t�|���S(���sa���Check good hashes against a file-like object Raise HashMismatch if none match. (���R���R���(���R���t���file(����(����s4���/usr/lib/python2.7/site-packages/pip/utils/hashes.pyt���check_against_file:���s����c���������C@��s)���t��|�d���}�|��j�|��SWd��QXd��S(���Nt���rb(���t���openR ���(���R���t���pathR���(����(����s4���/usr/lib/python2.7/site-packages/pip/utils/hashes.pyt���check_against_pathB���s����c���������C@��s ���t��|��j��S(���s,���Return whether I know any known-good hashes.(���t���boolR ���(���R���(����(����s4���/usr/lib/python2.7/site-packages/pip/utils/hashes.pyt ���__nonzero__F���s����c���������C@��s ���|��j����S(���N(���R&���(���R���(����(����s4���/usr/lib/python2.7/site-packages/pip/utils/hashes.pyt���__bool__J���s����N( ���t���__name__t ���__module__t���__doc__R ���R���R���R���R ���R$���R&���R'���(����(����(����s4���/usr/lib/python2.7/site-packages/pip/utils/hashes.pyR ������s���      t ���MissingHashesc�����������B@��s ���e��Z�d��Z�d���Z�d���Z�RS(���s���A workalike for Hashes used when we're missing a hash for a requirement It computes the actual hash of the requirement and raises a HashMissing exception showing it to the user. c���������C@��s$���t��t�|���j�d�i�g��t�6�d�S(���s!���Don't offer the ``hashes`` kwarg.R���N(���t���superR+���R���t ���FAVORITE_HASH(���R���(����(����s4���/usr/lib/python2.7/site-packages/pip/utils/hashes.pyR���U���s����c���������C@��s���t��|�t�j�����d��S(���N(���R���R-���R���(���R���R���(����(����s4���/usr/lib/python2.7/site-packages/pip/utils/hashes.pyR���[���s����(���R(���R)���R*���R���R���(����(����(����s4���/usr/lib/python2.7/site-packages/pip/utils/hashes.pyR+���N���s��� (���t ���__future__R����R���t���pip.exceptionsR���R���R���t ���pip.utilsR���t���pip._vendor.sixR���R���R���R-���t ���STRONG_HASHESt���objectR ���R+���(����(����(����s4���/usr/lib/python2.7/site-packages/pip/utils/hashes.pyt���<module>���s��� :PK�����!f[x �� ����filesystem.pycnu�[�������� abc�����������@���s5���d��d�l��Z��d��d�l�Z��d��d�l�m�Z�d���Z�d�S(���iN(���t ���get_path_uidc���������C���s���t��t�d��s�t�Sd��}�x�|��|�k�r�t�j�j�|���r�t�j���d�k�r{�y�t�|���}�Wn�t�k �rp�t �SX|�d�k�St�j �|��t�j ��Sq�|��t�j�j �|���}�}��q�Wd��S(���Nt���geteuidi����( ���t���hasattrt���ost���Truet���Nonet���patht���lexistsR���R����t���OSErrort���Falset���accesst���W_OKt���dirname(���R���t���previoust���path_uid(����(����s8���/usr/lib/python2.7/site-packages/pip/utils/filesystem.pyt���check_path_owner���s����  (���R���t���os.patht ���pip.compatR����R���(����(����(����s8���/usr/lib/python2.7/site-packages/pip/utils/filesystem.pyt���<module>���s���  PK�����!f[S �� ����deprecation.pyonu�[�������� abc�����������@@��s���d��Z��d�d�l�m�Z�d�d�l�Z�d�d�l�Z�d�e�f�d�����YZ�d�e�f�d�����YZ�d�e�f�d �����YZ �d �e�e�f�d �����YZ �d �e�f�d �����YZ �d�a �d�d�d��Z�d���Z�d�S(���sN��� A module that implements tooling to enable easy warnings about deprecations. i����(���t���absolute_importNt���PipDeprecationWarningc�����������B@��s���e��Z�RS(����(���t���__name__t ���__module__(����(����(����s9���/usr/lib/python2.7/site-packages/pip/utils/deprecation.pyR��� ���s���t���Pendingc�����������B@��s���e��Z�RS(����(���R���R���(����(����(����s9���/usr/lib/python2.7/site-packages/pip/utils/deprecation.pyR������s���t���RemovedInPip10Warningc�����������B@��s���e��Z�RS(����(���R���R���(����(����(����s9���/usr/lib/python2.7/site-packages/pip/utils/deprecation.pyR������s���t���RemovedInPip11Warningc�����������B@��s���e��Z�RS(����(���R���R���(����(����(����s9���/usr/lib/python2.7/site-packages/pip/utils/deprecation.pyR������s���t���Python26DeprecationWarningc�����������B@��s���e��Z�RS(����(���R���R���(����(����(����s9���/usr/lib/python2.7/site-packages/pip/utils/deprecation.pyR������s���c���������C@��s���|�d��k �r7�t�d��k �r�t�|��|�|�|�|�|��q�np�t�|�t��r�t�j�d��}�d�|��}�t�|�t��r~�|�j�|��q�|�j�|��n�t�|��|�|�|�|�|��d��S(���Ns���pip.deprecationss���DEPRECATION: %s( ���t���Nonet���_warnings_showwarningt ���issubclassR���t���loggingt ���getLoggerR���t���warningt���error(���t���messaget���categoryt���filenamet���linenot���filet���linet���loggert ���log_message(����(����s9���/usr/lib/python2.7/site-packages/pip/utils/deprecation.pyt ���_showwarning$���s����   c�����������C@��s;���t��j�d�t�d�t�t�d��k�r7�t��j�a�t�t��_�n��d��S(���Nt���defaultt���append(���t���warningst ���simplefilterR���t���TrueR ���R���t ���showwarningR���(����(����(����s9���/usr/lib/python2.7/site-packages/pip/utils/deprecation.pyt���install_warning_loggerD���s����  (���t���__doc__t ���__future__R����R ���R���t���WarningR���t���objectR���R���R���R���R���R ���R���R���(����(����(����s9���/usr/lib/python2.7/site-packages/pip/utils/deprecation.pyt���<module>���s���   PK�������Če[42 ��2 �� ����������������hashes.pynu�[��������PK�������Če[qj$����������������k ��deprecation.pynu�[��������PK�������Če[ 撸 �� �� ������������a��packaging.pynu�[��������PK�������Če[ 7t{ ��{ ����������������glibc.pynu�[��������PK�������Če[ M. �� ��������������p(��build.pynu�[��������PK�������Če[␕M-��M-��������������-��ui.pynu�[��������PK�������Če[Z?���� ������������J[��encoding.pynu�[��������PK�������Če[C���� ������������P_��filesystem.pynu�[��������PK�������Če[e��e�� ������������c��outdated.pynu�[��������PK�������Če[5 ;k"��k"�� ������������z��appdirs.pynu�[��������PK�������Če[3L\%��\%��������������U��__pycache__/ui.cpython-36.pycnu�[��������PK�������Če[~���� ��������������__pycache__/build.cpython-36.pycnu�[��������PK�������Če[_!^+����)������������^��__pycache__/encoding.cpython-36.opt-1.pycnu�[��������PK�������Če[[5jX��jX��#��������������__pycache__/__init__.cpython-36.pycnu�[��������PK�������Če[~N=X��=X��)������������[%�__pycache__/__init__.cpython-36.opt-1.pycnu�[��������PK�������Če[a 4��4��+������������}�__pycache__/filesystem.cpython-36.opt-1.pycnu�[��������PK�������Če[a 4��4��%�������������__pycache__/filesystem.cpython-36.pycnu�[��������PK�������Če[~����&������������ �__pycache__/build.cpython-36.opt-1.pycnu�[��������PK�������Če[b#-����,������������o�__pycache__/deprecation.cpython-36.opt-1.pycnu�[��������PK�������Če[_!^+����#������������x�__pycache__/encoding.cpython-36.pycnu�[��������PK�������Če[UtFC��C��&�������������__pycache__/glibc.cpython-36.opt-1.pycnu�[��������PK�������Če[:g��g��#������������K�__pycache__/outdated.cpython-36.pycnu�[��������PK�������Če['��'��(�������������__pycache__/logging.cpython-36.opt-1.pycnu�[��������PK�������Če['��'��"�������������__pycache__/logging.cpython-36.pycnu�[��������PK�������Če[H �� ��'�������������__pycache__/hashes.cpython-36.opt-1.pycnu�[��������PK�������Če[& Z����$�������������__pycache__/packaging.cpython-36.pycnu�[��������PK�������Če[H �� ��!�������������__pycache__/hashes.cpython-36.pycnu�[��������PK�������Če[T4��4��+�������������__pycache__/setuptools_build.cpython-36.pycnu�[��������PK�������Če[& Z����*������������e�__pycache__/packaging.cpython-36.opt-1.pycnu�[��������PK�������Če[T4��4��1������������n�__pycache__/setuptools_build.cpython-36.opt-1.pycnu�[��������PK�������Če[UtFC��C�� �������������__pycache__/glibc.cpython-36.pycnu�[��������PK�������Če[2e����"�������������__pycache__/appdirs.cpython-36.pycnu�[��������PK�������Če[2e����(�������������__pycache__/appdirs.cpython-36.opt-1.pycnu�[��������PK�������Če[j!%��!%��#������������D:�__pycache__/ui.cpython-36.opt-1.pycnu�[��������PK�������Če[:g��g��)������������_�__pycache__/outdated.cpython-36.opt-1.pycnu�[��������PK�������Če[b#-����&������������xr�__pycache__/deprecation.cpython-36.pycnu�[��������PK�������Če[g&x �� �� ������������{y�logging.pynu�[��������PK�������Če[J�����������������setuptools_build.pynu�[��������PK�������Če[Z3j��3j�� ������������ �__init__.pynu�[��������PK�������!f[\"��"�� ������������{�glibc.pyonu�[��������PK�������!f[`" !��!�� �������������appdirs.pycnu�[��������PK�������!f[8W���� �������������build.pyonu�[��������PK�������!f[ILh0��0�� ������������"�outdated.pyonu�[��������PK�������!f[KHy��y�� ������������ 9�hashes.pycnu�[��������PK�������!f[Ɩ+Ml��Ml�� ������������H�__init__.pycnu�[��������PK�������!f[Q U]-��]-��������������H�ui.pyonu�[��������PK�������!f[3z���� �������������logging.pyonu�[��������PK�������!f[ӣ-��-����������������ui.pycnu�[��������PK�������!f[`" !��!�� ������������#�appdirs.pyonu�[��������PK�������!f[ILh0��0�� ������������E�outdated.pycnu�[��������PK�������!f[x �� ��������������\�filesystem.pyonu�[��������PK�������!f[[׆ �� �� ������������i_�packaging.pycnu�[��������PK�������!f[8W���� ������������Ci�build.pycnu�[��������PK�������!f[ze[��[��������������3p�setuptools_build.pyonu�[��������PK�������!f['S���� ������������q�encoding.pycnu�[��������PK�������!f[Ąl��l�� ������������w�__init__.pyonu�[��������PK�������!f[[׆ �� �� ������������^�packaging.pyonu�[��������PK�������!f[\"��"�� ������������8�glibc.pycnu�[��������PK�������!f[3z���� �������������logging.pycnu�[��������PK�������!f[S �� ���������������deprecation.pycnu�[��������PK�������!f[ze[��[���������������setuptools_build.pycnu�[��������PK�������!f['S���� �������������encoding.pyonu�[��������PK�������!f[KHy��y�� �������������hashes.pyonu�[��������PK�������!f[x �� ��������������'�filesystem.pycnu�[��������PK�������!f[S �� ��������������*�deprecation.pyonu�[��������PK����A�A���*4���