9Tc@@sddlmZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddl Z ddl Z ddl Z ddlmZmZddlmZmZddlmZmZmZmZmZddlmZmZddlmZddlmZdd l m!Z!dd l"m#Z#e!rcdd l$m%Z&ndd l$m&Z&d ddddddddddddddddddd d!d"d#d$d%gZ'ej(e)Z*d&Z+e#d'd(d)d*e,d+Z-d,Z.d-Z/d.d/Z0ddd0Z2dd1Z3d2Z4d3Z5d4e6fd5YZ7e7Z8[7ej9d6ej:Z;d7Z<d8Z=d9Z>d:Z?d;Z@d<ZAd=ZBd>ZCd?ZDd@ZEdAZFdBZGdCZHdDZIdEZJdFZKeLeeLe,e,dGZMdHZNdIZOdJZPdKZQeLdLZRdMZSdNZTdOZUeLddeLejVdddPZWdQZXdRZYdSe6fdTYZZdUe&fdVYZ[ej\dWZ]dXZ^dYe6fdZYZ_dS([i(tabsolute_importN(tInstallationErrort BadCommand(tconsole_to_strt stdlib_pkgs(t site_packagest user_sitetrunning_under_virtualenvtvirtualenv_no_globaltwrite_delete_marker_file(t pkg_resourcestsix(tinput(t cStringIO(tPY2(tretry(tBytesIO(tStringIOtrmtreet display_patht backup_dirt find_commandtasktInftnormalize_nametsplitextt format_sizetis_installable_dirt is_svn_paget file_contentstsplit_leading_dirthas_leading_dirtmake_path_relativetnormalize_pathtrenamestget_terminal_sizetget_progt unzip_filet untar_filet unpack_filetcall_subprocesstcaptured_stdouttremove_tracebackscC@sOy.tjjtjddkr-dtjSWntttfk rJnXdS(Nis __main__.pys-cs %s -m piptpip(s __main__.pys-c( tostpathtbasenametsystargvt executabletAttributeErrort TypeErrort IndexError(((s8/usr/lib/python2.7/vendor-packages/pip/utils/__init__.pyR$0s tstop_max_delayi t wait_fixedicC@stj|d|dtdS(Nt ignore_errorstonerror(tshutilRtrmtree_errorhandler(tdirR7((s8/usr/lib/python2.7/vendor-packages/pip/utils/__init__.pyR:scC@sAtj|jtj@r:tj|tj||dSdS(sOn 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,tstattst_modetS_IREADtchmodtS_IWRITE(tfuncR-texc_info((s8/usr/lib/python2.7/vendor-packages/pip/utils/__init__.pyR:@s  cC@stjjtjj|}tjddkrd|jtjd}|jtj d}n|j tj tjj rd|t tj }n|S(sTGives the display value for a given path, making it relative to cwd if possible.iitreplacet.(R,R-tnormcasetabspathR/t version_infotdecodetgetfilesystemencodingtencodetgetdefaultencodingt startswithtgetcwdtseptlen(R-((s8/usr/lib/python2.7/vendor-packages/pip/utils/__init__.pyROss.bakcC@sKd}|}x4tjj||rB|d7}|t|}qW||S(s\Figure out the name of a directory to back up the given dir to (adding .bak, .bak2, etc)i(R,R-texistststr(R;texttnt extension((s8/usr/lib/python2.7/vendor-packages/pip/utils/__init__.pyR[s  cC@sL|dkr0tjjddjtj}nt|tjrN|g}n|dkrft }ng|j jtjD]}t |r|^q}tj j |dj |krdg}nxj|D]b}tj j||}x.|D]&}||}tj j|r|SqWtj j|r|SqWtd|dS(s<Searches the PATH for the given command and returns its pathtPATHtisCannot find command %rN(tNoneR,tenvirontgettsplittpathsept isinstanceR t string_typest get_pathexttlowerROR-RtjointisfileR(tcmdtpathstpathextRRR-tcmd_patht cmd_path_ext((s8/usr/lib/python2.7/vendor-packages/pip/utils/__init__.pyRfs$ $   7"    cC@sF|dkr-tjjddddg}ntjjd|}|S(s9Returns the path extensions from environment or a defaults.COMs.EXEs.BATs.CMDtPATHEXTN(RWR,R[R`RXRY(tdefault_pathextRd((s8/usr/lib/python2.7/vendor-packages/pip/utils/__init__.pyR^s !cC@sCx3tjjddjD]}||kr|SqWt||S(NtPIP_EXISTS_ACTIONRV(R,RXRYRZR(tmessagetoptionstaction((s8/usr/lib/python2.7/vendor-packages/pip/utils/__init__.pytask_path_existss" cC@sxxqtjjdr(td|nt|}|jj}||krmd|dj|fGHq|SqdS(s@Ask the message interactively, with the given possible responsest PIP_NO_INPUTs7No input was expected ($PIP_NO_INPUT set); question: %ss<Your response (%r) was not one of the expected responses: %ss, N(R,RXRYt ExceptionR tstripR_R`(RjRktresponse((s8/usr/lib/python2.7/vendor-packages/pip/utils/__init__.pyRs   t_InfcB@sMeZdZdZdZdZdZdZdZdZ RS(sI am bigger than everything!cC@s||krtStSdS(N(tTruetFalse(tselftother((s8/usr/lib/python2.7/vendor-packages/pip/utils/__init__.pyt__eq__s cC@s|j| S(N(Rw(RuRv((s8/usr/lib/python2.7/vendor-packages/pip/utils/__init__.pyt__ne__scC@stS(N(Rt(RuRv((s8/usr/lib/python2.7/vendor-packages/pip/utils/__init__.pyt__lt__scC@stS(N(Rt(RuRv((s8/usr/lib/python2.7/vendor-packages/pip/utils/__init__.pyt__le__scC@stS(N(Rs(RuRv((s8/usr/lib/python2.7/vendor-packages/pip/utils/__init__.pyt__gt__scC@stS(N(Rs(RuRv((s8/usr/lib/python2.7/vendor-packages/pip/utils/__init__.pyt__ge__scC@sdS(NR((Ru((s8/usr/lib/python2.7/vendor-packages/pip/utils/__init__.pyt__repr__s( t__name__t __module__t__doc__RwRxRyRzR{R|R}(((s8/usr/lib/python2.7/vendor-packages/pip/utils/__init__.pyRrs      s[^a-z]cC@stjd|jS(Nt-(t _normalize_retsubR_(tname((s8/usr/lib/python2.7/vendor-packages/pip/utils/__init__.pyRscC@sX|dkrd|ddS|d kr4d|dS|dkrLd|dSd|SdS( Nis%.1fMBg@@i s%ikBs%.1fkBs%ibytesi@Bi'((tbytes((s8/usr/lib/python2.7/vendor-packages/pip/utils/__init__.pyRs     cC@sEtjj|stStjj|d}tjj|rAtStS(s@Return True if `path` is a directory containing a setup.py file.ssetup.py(R,R-tisdirRtR`RaRs(R-tsetup_py((s8/usr/lib/python2.7/vendor-packages/pip/utils/__init__.pyRs cC@s(tjd|o'tjd|tjS(sT Returns true if the page appears to be the index page of an svn repository s[^<]*Revision \d+:s#���Powered by (?:<a[^>]*?>)?Subversion(���t���ret���searcht���I(���t���html(����(����s8���/usr/lib/python2.7/vendor-packages/pip/utils/__init__.pyR������s����c���������C@��s/���t��|��d���}�|�j���j�d��SWd��QXd��S(���Nt���rbs���utf-8(���t���opent���readRH���(���t���filenamet���fp(����(����s8���/usr/lib/python2.7/vendor-packages/pip/utils/__init__.pyR������s����c���������C@��s���t��|���}��|��j�d��j�d��}��d�|��k�rv�d�|��k�rZ�|��j�d��|��j�d��k��sf�d�|��k�rv�|��j�d�d��Sd�|��k�r�|��j�d�d��S|��d�f�Sd��S(���Nt���/s���\i���RV���(���RQ���t���lstript���findRZ���(���R-���(����(����s8���/usr/lib/python2.7/vendor-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(���RW���R���Rt���Rs���(���Rc���t ���common_prefixR-���t���prefixt���rest(����(����s8���/usr/lib/python2.7/vendor-packages/pip/utils/__init__.pyR������s����    c���������C@��s7��t��j�j�|���}�t��j�j�|���}��t��j�j�t��j�j�|����}��t��j�j�t��j�j�|���}�|��j�t��j�j��j�t��j�j��}�|�j�t��j�j��j�t��j�j��}�x>�|�r�|�r�|�d�|�d�k�r�|�j �d��|�j �d��q�Wd�g�t �|��|�|�g�}�|�d�g�k�r$d�t��j�j�St��j�j�j �|��S(���s�� Make a filename relative, where the filename path, and it is relative to rel_to >>> make_path_relative('/usr/share/something/a-file.pth', ... '/usr/share/another-place/src/Directory') '../../../something/a-file.pth' >>> make_path_relative('/usr/share/something/a-file.pth', ... '/home/user/src/Directory') '../../../usr/share/something/a-file.pth' >>> make_path_relative('/usr/share/a-file.pth', '/usr/share/') 'a-file.pth' i����s���..RV���RD���( ���R,���R-���R.���t���dirnamet���normpathRF���Rp���RN���RZ���t���popRO���R`���(���R-���t���rel_tot ���path_filenamet ���path_partst ���rel_to_partst ���full_parts(����(����s8���/usr/lib/python2.7/vendor-packages/pip/utils/__init__.pyR �����s����$$# c���������C@��s(���t��j�j�t��j�j�t��j�j�|�����S(���sN��� Convert a path to its canonical, case-normalized, absolute version. (���R,���R-���RE���t���realpatht ���expanduser(���R-���(����(����s8���/usr/lib/python2.7/vendor-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���R_���t���endswith(���R-���t���baseRR���(����(����s8���/usr/lib/python2.7/vendor-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( ���R,���R-���RZ���RP���t���makedirsR9���t���movet ���removedirst���OSError(���t���oldt���newt���headt���tail(����(����s8���/usr/lib/python2.7/vendor-packages/pip/utils/__init__.pyR"���5��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���Rs���R!���RL���R/���R���(���R-���(����(����s8���/usr/lib/python2.7/vendor-packages/pip/utils/__init__.pyt���is_localF��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(����(����s8���/usr/lib/python2.7/vendor-packages/pip/utils/__init__.pyt ���dist_is_localR��s����c���������C@��s%���t��t�|����}�|�j�t��t���S(���sF��� Return True if given Distribution is installed in user site. (���R!���R���RL���R���(���R���t ���norm_path(����(����s8���/usr/lib/python2.7/vendor-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���RL���R���(���R���(����(����s8���/usr/lib/python2.7/vendor-packages/pip/utils/__init__.pyt���dist_in_site_packagese��s����c���������C@��s)���d�d�l��m�}�|�j�|��g���}�|�j�S(���s$���Is distribution an editable install?i����(���t���FrozenRequirement(���R+���R���t ���from_distt���editable(���R���R���t���req(����(����s8���/usr/lib/python2.7/vendor-packages/pip/utils/__init__.pyt���dist_is_editableo��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(���Rs���(���t���d(����(����s8���/usr/lib/python2.7/vendor-packages/pip/utils/__init__.pyt���<lambda>��s����c���������S@��s���t��S(���N(���Rs���(���R���(����(����s8���/usr/lib/python2.7/vendor-packages/pip/utils/__init__.pyR�����s����c���������S@��s ���t��|��� S(���N(���R���(���R���(����(����s8���/usr/lib/python2.7/vendor-packages/pip/utils/__init__.pyR�����s����c���������S@��s ���t��|���S(���N(���R���(���R���(����(����s8���/usr/lib/python2.7/vendor-packages/pip/utils/__init__.pyR�����s����c���������S@��s���t��S(���N(���Rs���(���R���(����(����s8���/usr/lib/python2.7/vendor-packages/pip/utils/__init__.pyR�����s����c���������S@��s���t��S(���N(���Rs���(���R���(����(����s8���/usr/lib/python2.7/vendor-packages/pip/utils/__init__.pyR�����s����(���R���R���R ���t ���working_sett���key( ���t ���local_onlyt���skipt���include_editablest���editables_onlyt ���user_onlyt ���local_testt ���editable_testt���editables_only_testt ���user_testR���(����(����s8���/usr/lib/python2.7/vendor-packages/pip/utils/__init__.pyt���get_installed_distributionsw��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���R,���R-���R`���t ���project_nameRa���(���R���t���sitest���sitet���egglink(����(����s8���/usr/lib/python2.7/vendor-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���t���egg_link(����(����s8���/usr/lib/python2.7/vendor-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 ���TIOCGWINSZRW���(���t���fdR���R���R���t���cr(����(����s8���/usr/lib/python2.7/vendor-packages/pip/utils/__init__.pyt ���ioctl_GWINSZ��s����    i����i���i���t���LINESi���t���COLUMNSiP���(���R,���R���t���ctermidt���O_RDONLYt���closeRX���RY���t���int(���R���R���R���(����(����s8���/usr/lib/python2.7/vendor-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����(���R,���t���umask(���t���mask(����(����s8���/usr/lib/python2.7/vendor-packages/pip/utils/__init__.pyt ���current_umask��s���� c��� ������C@��s��t��j�j�|��s"�t��j�|��n��t�|��d��}�zt�j�|�d�t�}�t�|�j ����o^�|�}�xO|�j ���D]A}�|�j �}�|�j �|��}�|�} �|�r�t �|��d�} �n��t��j�j�|�| ��} �t��j�j�| ��} �t��j�j�| ��s�t��j�| ��n��| �j�d��s| �j�d��r7t��j�j�| ��st��j�| ��qqn�t�| �d��} �z�| �j�|��Wd�| �j���|�j�d�?} �| �rt�j�| ��r| �d �@rt��j�| �d �t���d �B�n��Xqn�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. R���t ���allowZip64i���R���s���\t���wbNi���iI���i��(���R,���R-���RP���R���R���t���zipfilet���ZipFileRs���R���t���namelistt���infolistR���R���R���R`���R���R���t���writeR���t ���external_attrR<���t���S_ISREGR?���R���( ���R���R���t���flattent���zipfpt���zipt���leadingt���infoR���t���datat���fnR;���R���t���mode(����(����s8���/usr/lib/python2.7/vendor-packages/pip/utils/__init__.pyR%�����s6����    'c��� ������C@��s��t��j�j�|��s"�t��j�|��n��|��j���j�d��sL�|��j���j�d��rU�d�}�ng�|��j���j�d��s�|��j���j�d��r�d�}�n4�|��j���j�d��r�d�}�n�t�j�d �|���d �}�t�j �|��|��}�z t �g��|�j ���D]�}�|�j �d �k�r�|�j �^�q��}�x|�j ���D]}�|�j �}�|�d �k�r6qn��|�rOt �|��d �}�n��t��j�j�|�|��}�|�j���rt��j�j�|��st��j�|��qq|�j���ry�|�j�|�|��Wqt�k �r}�t�j�d �|��|�j �|��qqXqy�|�j�|��} �Wn5�t�t�f�k �r4}�t�j�d �|��|�j �|��qn�Xt��j�j�t��j�j�|���sot��j�t��j�j�|���n��t �|�d��} �z�t�j�| �| ��Wd�| �j���X| �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���.bz2s���.tbzs���r:bz2s���.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,���R-���RP���R���R_���R���t���loggert���warningt���tarfileR���R���t ���getmembersR���R���R`���R���t���issymt���_extract_memberRo���t ���extractfilet���KeyErrorR2���R���R9���t ���copyfileobjR���R���R?���R���( ���R���R���R���t���tart���memberR���R���R-���t���excR���t���destfp(����(����s8���/usr/lib/python2.7/vendor-packages/pip/utils/__init__.pyR&���0��sh���� *    !        &c���������C@��s0��t��j�j�|���}��|�d�k�sK�|��j�d��sK�|��j�d��sK�t�j�|���rk�t�|��|�d�|��j�d�� n�|�d�k�s�t�j�|���s�t �|���d�j ���d�k�r�t �|��|��nz�|�r|�j �d ��rt �t�|����rd �d�l�m�}�|�d�|�j��j�|��n&�t�j�d�|��|�|��t�d�|���d��S(���Ns���application/zips���.zips���.whlR���s���application/x-gzipi���s���.tars���.tar.gzs���.tar.bz2s���.tgzs���.tbzs ���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(���s���.tars���.tar.gzs���.tar.bz2s���.tgzs���.tbz(���R,���R-���R���R���R���t ���is_zipfileR%���R���t ���is_tarfileR���R_���R&���RL���R���R���t���pip.vcs.subversionR��t���urlR���R���t���criticalR���(���R���R���t ���content_typet���linkR��(����(����s8���/usr/lib/python2.7/vendor-packages/pip/utils/__init__.pyR'�����s.����    c���������C@��s8���d�}�t��j�|�d�|���}��t�r%�|��St��j�d�d�|���S(���NsR���(?:\W+File "(?:.*)", line (?:.*)\W+(?:.*)\W+\^\W+)?Syntax(?:Error|Warning): (?:.*)RV���s���\*\*\* Error compiling (?:.*)(���R���R���R���(���t���outputt���pattern(����(����s8���/usr/lib/python2.7/vendor-packages/pip/utils/__init__.pyR*�����s ����c������ ���C@��s��|�d��k�r�g��}�xd�|��D]\�} �d�| �k�sO�d�| �k�sO�d�| �k�sO�d�| �k�rh�d�| �j�d�d��} �n��|�j�| ��q�Wd�j�|��}�n��|�r�d��} �n �t�j�} �t�j�|�d�|��t�j �j ���} �|�r�| �j �|��n��y4�t�j �|��d�t�j �d �d��d �| �d �|�d �| �} �Wn)�t�k �r:} �t�j�d �| �|����n�Xg��}�| �d��k �r�t�t�| �j�j�����} �t�| ��} �x�| �j���}�|�sPn��|�j���}�|�j�|�d��|�r|�|��}�t�|�t��r|�\�}�}�n��t�j�|�|��qwt�j�|��qwn!�| �j���\�}�}�|�pd�g�}�| �j���| �j�r|�r|�rmt�j�d�|��t�j�d�j�|��d��n��t�d�|�| �j�|�f���qt�j�d�|�| �j�|��n��| �d��k �rt�d�j�|���Sd��S(���Nt��� s��� t���"t���'s���"%s"s���\"s���Running command %st���stderrt���stdint���stdoutt���cwdt���envs#���Error %s while executing command %sRV���s ���Complete output from command %s:s)��� ----------------------------------------s,���Command "%s" failed with error code %s in %ss$���Command "%s" had error code %s in %s( ���RW���RC���R���R`���t ���subprocesst���PIPER���t���logR,���RX���t���copyt���updatet���Popent���STDOUTRo���R��R*���R���R��R���R ���t���readlinet���rstripR\���t���tuplet���debugt ���communicatet���waitt ���returncodeR���R���R���(���Rb���t ���show_stdoutt ���filter_stdoutR��t���raise_on_returncodet ���command_levelt ���command_desct ���extra_environt ���cmd_partst���partR��R��t���procR���t ���all_outputt���linet���levelt���returned_stdoutt���returned_stderr(����(����s8���/usr/lib/python2.7/vendor-packages/pip/utils/__init__.pyR(�����sr����  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. R���Ns���utf-8t���latin1( ���R���R���t���localet���getpreferredencodingRt���RH���t���UnicodeDecodeErrort���typeR���t���AssertionError(���R���R���R���t ���encodingst���enc(����(����s8���/usr/lib/python2.7/vendor-packages/pip/utils/__init__.pyt���read_text_file��s����   c���������C@��s���t��j�|���t�|���d��S(���N(���R,���R���R ���(���t ���build_dir(����(����s8���/usr/lib/python2.7/vendor-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(����(����s8���/usr/lib/python2.7/vendor-packages/pip/utils/__init__.pys ���<genexpr>��s����(���t���_gen(���Ru���t���lines(����(����s8���/usr/lib/python2.7/vendor-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(���NRV���(���t���nextR>��t ���NameErrort ���StopIteration(���Ru���(����(����s8���/usr/lib/python2.7/vendor-packages/pip/utils/__init__.pyR����s����  c���������C@��s���|��j��S(���N(���R>��(���Ru���(����(����s8���/usr/lib/python2.7/vendor-packages/pip/utils/__init__.pyt���__iter__#��s����(���R~���R���R���R@��R��RD��(����(����(����s8���/usr/lib/python2.7/vendor-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���clsRF��(����(����s8���/usr/lib/python2.7/vendor-packages/pip/utils/__init__.pyt ���from_stream)��s���� c���������C@��s ���|��j��j�S(���N(���RF��t���encoding(���Ru���(����(����s8���/usr/lib/python2.7/vendor-packages/pip/utils/__init__.pyRI��/��s����(���R~���R���t ���classmethodRH��t���propertyRI��(����(����(����s8���/usr/lib/python2.7/vendor-packages/pip/utils/__init__.pyRE��'��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���getattrR/���t���setattrRE��RH��(���t ���stream_namet ���orig_stdout(����(����s8���/usr/lib/python2.7/vendor-packages/pip/utils/__init__.pyt���captured_output4��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��(���RP��(����(����(����s8���/usr/lib/python2.7/vendor-packages/pip/utils/__init__.pyR)���C��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(���NR���(���RL��R���RA���(���Ru���RA���(����(����s8���/usr/lib/python2.7/vendor-packages/pip/utils/__init__.pyR@��W��s����c���������C@��s4���|�d��k�r�|��S|��j�|��}�|�j�|��j�j�<|�S(���N(���RW���RA���t���__dict__R~���(���Ru���t���objRG��t���value(����(����s8���/usr/lib/python2.7/vendor-packages/pip/utils/__init__.pyt���__get__[��s����  (���R~���R���R���R@��RU��(����(����(����s8���/usr/lib/python2.7/vendor-packages/pip/utils/__init__.pyRQ��O��s��� (`���t ���__future__R����t ���contextlibR1��t���loggingR���R,���R���R9���R<���R��R/���R���R���t���pip.exceptionsR���R���t ���pip.compatR���R���t ���pip.locationsR���R���R���R���R ���t ���pip._vendorR ���R ���t���pip._vendor.six.movesR ���R ���t���pip._vendor.sixR���t���pip._vendor.retryingR���t���ioR���R���t���__all__t ���getLoggerR~���R���R$���Rt���R���R:���R���R���RW���R���R^���Rm���R���t���objectRr���R���t���compileR���R���R���R���R���R���R���R���R���R ���R!���R���R"���R���R���R���R���R���Rs���R���R���R���R#���R���R%���R&���R'���R*���t���DEBUGR(���R8��R:��R;��RE��t���contextmanagerRP��R)���RQ��(����(����(����s8���/usr/lib/python2.7/vendor-packages/pip/utils/__init__.pyt���<module>���s���            (                      / %    . O "   G