JFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3RbrJFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbrў 7Re$bc@sddlZddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddl m Z m Z mZddlmZmZmZmZmZmZddlmZmZmZddlmZddlmZddlmZdd d d d d ddddddddddddddddddd gZ d!dZ!d]d"dZ#d#d$Z$d%d Z%d&d'd Z&ddd(d Z(dd)d*Z)d+d,Z*d-d Z+Gd.d/d/e,Z-e-Z.[-ej/d0ej0Z1d1dZ2d2dZ3d3dZ4d4dZ5d5dZ6d6dZ7d7dZ8d8dZ9d9dZ:d:dZ;d;dZ<d<d=Z=d>d?Z>d@dAZ?dBdCZ@dDdEZAd^d_d^d]dJdKZCdLdMZDdNdOZEdPdZFdQdRZGd^dSdZHdTdZIdUdZJdVdZKdWdZLd^ddd^ejMdddXd ZNdYdZZOGd[d\d\e,ZPdS(`iN(uInstallationErroru BadCommanduPipError(u WindowsErroru string_typesu raw_inputuconsole_to_stru user_siteuPermissionError(u site_packagesurunning_under_virtualenvuvirtualenv_no_global(ulogger(u pkg_resources(uversionurmtreeu display_pathu backup_diru find_commanduaskuInfunormalize_nameusplitextu format_sizeuis_installable_diru is_svn_pageu file_contentsusplit_leading_diruhas_leading_dirumake_path_relativeunormalize_pathurenamesuget_terminal_sizeuget_progu unzip_fileu untar_fileucreate_download_cache_folderucache_downloadu unpack_fileucall_subprocessc CsPy.tjjtjddkr-dtjSWntttfk rKYnXdS(Niu __main__.pyu-cu %s -m pipupip(u __main__.pyu-c( uosupathubasenameusysuargvu executableuAttributeErroru TypeErroru IndexError(((u!/tmp/pip-zej_zi-build/pip/util.pyuget_prog!s cCstj|d|dtdS(Nu ignore_errorsuonerror(ushutilurmtreeurmtree_errorhandler(udiru ignore_errors((u!/tmp/pip-zej_zi-build/pip/util.pyurmtree*scCs|dd\}}|tkr5|jddkpp|tkrT|jddkpp|tkop|jddksyntj|jtj@tjkrntj|tj ||dS(uOn 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.Niiii i( u WindowsErroruargsuOSErroruPermissionErroruosustatust_modeuS_IREADuchmoduS_IWRITE(ufuncupathuexc_infouexctypeuvalue((u!/tmp/pip-zej_zi-build/pip/util.pyurmtree_errorhandler/s"urmtree_errorhandlercCsdtjjtjj|}|jtjtjjr`d|ttjd}n|S(uTGives the display value for a given path, making it relative to cwd if possible.u.N(uosupathunormcaseuabspathu startswithugetcwdusepulen(upath((u!/tmp/pip-zej_zi-build/pip/util.pyu display_pathBs#u.bakcCsKd}|}x4tjj||rB|d7}|t|}qW||S(u\Figure out the name of a directory to back up the given dir to (adding .bak, .bak2, etc)i(uosupathuexistsustr(udiruextunu extension((u!/tmp/pip-zej_zi-build/pip/util.pyu backup_dirKs  cCs7|dkr0tjjddjtj}nt|trK|g}n|dkrct}ndd|j jtjD}tj j |dj |krdg}nxj|D]b}tj j ||}x.|D]&}||}tj j |r|SqWtj j |r|SqWtd|dS(u<Searches the PATH for the given command and returns its pathuPATHucSs"g|]}t|r|qS((ulen(u.0uext((u!/tmp/pip-zej_zi-build/pip/util.pyu _s u find_command..iuCannot find command %rN(uNoneuosuenvironugetusplitupathsepu isinstanceu string_typesu get_pathextulowerupathusplitextujoinuisfileu BadCommand(ucmdupathsupathextupathucmd_pathuextu cmd_path_ext((u!/tmp/pip-zej_zi-build/pip/util.pyu find_commandVs$ $   %"    cCsF|dkr-tjjddddg}ntjjd|}|S(u9Returns the path extensions from environment or a defaultu.COMu.EXEu.BATu.CMDuPATHEXTN(uNoneuosupathsepujoinuenvironuget(udefault_pathextupathext((u!/tmp/pip-zej_zi-build/pip/util.pyu get_pathextqs !u get_pathextcCsCx3tjjddjD]}||kr|SqWt||S(NuPIP_EXISTS_ACTIONu(uosuenvironugetusplituask(umessageuoptionsuaction((u!/tmp/pip-zej_zi-build/pip/util.pyuask_path_existsys" uask_path_existscCs}xvtjjdr(td|nt|}|jj}||krrtd|dj|fq|SqdS(u@Ask the message interactively, with the given possible responsesu PIP_NO_INPUTu7No input was expected ($PIP_NO_INPUT set); question: %su<Your response (%r) was not one of the expected responses: %su, N( uosuenvironugetu Exceptionu raw_inputustripuloweruprintujoin(umessageuoptionsuresponse((u!/tmp/pip-zej_zi-build/pip/util.pyuasks  cBsn|EeZdZdZddZddZddZdd Zd d Zd d Z ddZ dS(u_InfuI am bigger than everything!cCs||krdSdSdS(NTF(uTrueuFalse(uselfuother((u!/tmp/pip-zej_zi-build/pip/util.pyu__eq__s u _Inf.__eq__cCs|j| S(N(u__eq__(uselfuother((u!/tmp/pip-zej_zi-build/pip/util.pyu__ne__su _Inf.__ne__cCsdS(NF(uFalse(uselfuother((u!/tmp/pip-zej_zi-build/pip/util.pyu__lt__su _Inf.__lt__cCsdS(NF(uFalse(uselfuother((u!/tmp/pip-zej_zi-build/pip/util.pyu__le__su _Inf.__le__cCsdS(NT(uTrue(uselfuother((u!/tmp/pip-zej_zi-build/pip/util.pyu__gt__su _Inf.__gt__cCsdS(NT(uTrue(uselfuother((u!/tmp/pip-zej_zi-build/pip/util.pyu__ge__su _Inf.__ge__cCsdS(NuInf((uself((u!/tmp/pip-zej_zi-build/pip/util.pyu__repr__su _Inf.__repr__N( u__name__u __module__u __qualname__u__doc__u__eq__u__ne__u__lt__u__le__u__gt__u__ge__u__repr__(u __locals__((u!/tmp/pip-zej_zi-build/pip/util.pyu_Infs      u_Infu[^a-z]cCstjd|jS(Nu-(u _normalize_reusubulower(uname((u!/tmp/pip-zej_zi-build/pip/util.pyunormalize_namescCsX|dkrd|ddS|d kr4d|dS|dkrLd|dSd|SdS( Niu%.1fMBg@@i u%ikBu%.1fkBu%ibytesi@Bi'((ubytes((u!/tmp/pip-zej_zi-build/pip/util.pyu format_sizes     cCsEtjj|sdStjj|d}tjj|rAdSdS(u@Return True if `path` is a directory containing a setup.py file.usetup.pyFT(uosupathuisdiruFalseujoinuisfileuTrue(upathusetup_py((u!/tmp/pip-zej_zi-build/pip/util.pyuis_installable_dirs cCs(tjd|o'tjd|tjS(uJReturns true if the page appears to be the index page of an svn repositoryu[^<]*Revision \d+:u#���Powered by (?:<a[^>]*?>)?Subversion(���u���reu���searchu���I(���u���html(����(����u!���/tmp/pip-zej_zi-build/pip/util.pyu ���is_svn_page���s����c���������� ���C���s8���t��|��d��}�z�|�j���j�d��SWd��|�j���Xd��S(���Nu���rbu���utf-8(���u���openu���readu���decodeu���close(���u���filenameu���fp(����(����u!���/tmp/pip-zej_zi-build/pip/util.pyu ���file_contents���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(���Nu���/u���\i���u����(���u���stru���lstripu���findu���split(���u���path(����(����u!���/tmp/pip-zej_zi-build/pip/util.pyu���split_leading_dir���s���� 6  c�������������C���s\���d�}�xO�|��D]G�}�t�|��\�}�}�|�s/�d�S|�d�k�rD�|�}�q �|�|�k�r �d�Sq �Wd�S(���uy���Returns true if all the paths have the same leading path name (i.e., everything is in one subdirectory in an archive)NFT(���u���Noneu���split_leading_diru���Falseu���True(���u���pathsu ���common_prefixu���pathu���prefixu���rest(����(����u!���/tmp/pip-zej_zi-build/pip/util.pyu���has_leading_dir���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(���u�� Make a filename relative, where the filename path, and it is relative to rel_to >>> make_relative_path('/usr/share/something/a-file.pth', ... '/usr/share/another-place/src/Directory') '../../../something/a-file.pth' >>> make_relative_path('/usr/share/something/a-file.pth', ... '/home/user/src/Directory') '../../../usr/share/something/a-file.pth' >>> make_relative_path('/usr/share/a-file.pth', '/usr/share/') 'a-file.pth' i����u���..u����u���.( ���u���osu���pathu���basenameu���dirnameu���normpathu���abspathu���stripu���sepu���splitu���popu���lenu���join(���u���pathu���rel_tou ���path_filenameu ���path_partsu ���rel_to_partsu ���full_parts(����(����u!���/tmp/pip-zej_zi-build/pip/util.pyu���make_path_relative���s����$$# c�������������C���s(���t��j�j�t��j�j�t��j�j�|�����S(���uN��� Convert a path to its canonical, case-normalized, absolute version. (���u���osu���pathu���normcaseu���realpathu ���expanduser(���u���path(����(����u!���/tmp/pip-zej_zi-build/pip/util.pyu���normalize_path��s����c�������������C���s[���t��j�|���\�}�}�|�j���j�d��rQ�|�d�d��|�}�|�d�d��}�n��|�|�f�S(���u,���Like os.path.splitext, but take off .tar toou���.tari���Nii(���u ���posixpathu���splitextu���loweru���endswith(���u���pathu���baseu���ext(����(����u!���/tmp/pip-zej_zi-build/pip/util.pyu���splitext��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�Yq�Xn��d�S(���u7���Like os.renames(), but handles renaming across devices.N( ���u���osu���pathu���splitu���existsu���makedirsu���shutilu���moveu ���removedirsu���OSError(���u���oldu���newu���headu���tail(����(����u!���/tmp/pip-zej_zi-build/pip/util.pyu���renames!��s����  c�������������C���s)���t����s �d�St�|���j�t�t�j���S(���u��� 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." T(���u���running_under_virtualenvu���Trueu���normalize_pathu ���startswithu���sysu���prefix(���u���path(����(����u!���/tmp/pip-zej_zi-build/pip/util.pyu���is_local2��s���� u���is_localc�������������C���s���t��t�|����S(���u��� Return True if given Distribution object is installed locally (i.e. within current virtualenv). Always True if we're not in a virtualenv. (���u���is_localu ���dist_location(���u���dist(����(����u!���/tmp/pip-zej_zi-build/pip/util.pyu ���dist_is_local>��s����u ���dist_is_localc�������������C���s-���t��r%�t�t�|����j�t�t����Sd�Sd�S(���uF��� Return True if given Distribution is installed in user site. NF(���u ���user_siteu���normalize_pathu ���dist_locationu ���startswithu���False(���u���dist(����(����u!���/tmp/pip-zej_zi-build/pip/util.pyu���dist_in_usersiteI��s����u���dist_in_usersitec�������������C���s���t��t�|����j�t��t���S(���ua��� Return True if given Distribution is installed in distutils.sysconfig.get_python_lib(). (���u���normalize_pathu ���dist_locationu ���startswithu ���site_packages(���u���dist(����(����u!���/tmp/pip-zej_zi-build/pip/util.pyu���dist_in_site_packagesR��s����u���dist_in_site_packagesc�������������C���s)���d�d�l��m�}�|�j�|��g���}�|�j�S(���u$���Is distribution an editable install?i����(���u���FrozenRequirement(���u���pipu���FrozenRequirementu ���from_distu���editable(���u���distu���FrozenRequirementu���req(����(����u!���/tmp/pip-zej_zi-build/pip/util.pyu���dist_is_editableY��s����u���dist_is_editableu ���setuptoolsu���pipu���pythonu ���distributec����������������s���|��r�t���n �d�d����|�r0�d�d�����n �d�d�����|�rQ�d�d����n �d�d���������f�d�d���t�j�D�S( ���u�� 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 ('setuptools', 'pip', 'python'). [FIXME also skip virtualenv?] If ``editables`` is False, don't report editables. If ``editables_only`` is True , only report editables. c�������������S���s���d�S(���NT(���u���True(���u���d(����(����u!���/tmp/pip-zej_zi-build/pip/util.pyu���<lambda>v��s����u-���get_installed_distributions.<locals>.<lambda>c�������������S���s���d�S(���NT(���u���True(���u���d(����(����u!���/tmp/pip-zej_zi-build/pip/util.pyu���<lambda>y��s����c�������������S���s ���t��|��� S(���N(���u���dist_is_editable(���u���d(����(����u!���/tmp/pip-zej_zi-build/pip/util.pyu���<lambda>{��s����c�������������S���s ���t��|���S(���N(���u���dist_is_editable(���u���d(����(����u!���/tmp/pip-zej_zi-build/pip/util.pyu���<lambda>~��s����c�������������S���s���d�S(���NT(���u���True(���u���d(����(����u!���/tmp/pip-zej_zi-build/pip/util.pyu���<lambda>��s����c����������������sI���g��|��]?�}��|��r�|�j���k�r���|��r��|��r�|��q�S(����(���u���key(���u���.0u���d(���u ���editable_testu���editables_only_testu ���local_testu���skip(����u!���/tmp/pip-zej_zi-build/pip/util.pyu ���<listcomp>��s ��� �  u/���get_installed_distributions.<locals>.<listcomp>(���u ���dist_is_localu ���pkg_resourcesu ���working_set(���u ���local_onlyu���skipu���include_editablesu���editables_only(����(���u ���editable_testu���editables_only_testu ���local_testu���skipu!���/tmp/pip-zej_zi-build/pip/util.pyu���get_installed_distributions`��s����    u���get_installed_distributionsc�������������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(���u �� 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. u ���.egg-linkN( ���u���running_under_virtualenvu���virtualenv_no_globalu���appendu ���site_packagesu ���user_siteu���osu���pathu���joinu ���project_nameu���isfile(���u���distu���sitesu���siteu���egglink(����(����u!���/tmp/pip-zej_zi-build/pip/util.pyu ���egg_link_path��s����     u ���egg_link_pathc�������������C���s���t��|���}�|�r�|�S|��j�S(���u��� 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. (���u ���egg_link_pathu���location(���u���distu���egg_link(����(����u!���/tmp/pip-zej_zi-build/pip/util.pyu ���dist_location��s���� u ���dist_locationc����������� ���C���s���d�d���}��|��d��p-�|��d��p-�|��d��}�|�s|�y8�t��j�t��j���t��j��}�|��|��}�t��j�|��Wq|�Yq|�Xn��|�s�t��j�j�d�d��t��j�j�d�d ��f�}�n��t�|�d��t�|�d��f�S( ���ul���Returns a tuple (x, y) representing the width(x) and the height(x) in characters of the terminal window.c���������� ���S���s���yL�d�d��l��}�d�d��l�}�d�d��l�}�|�j�d�|�j�|��|�j�d���}�Wn �d��SYn�X|�d�k�rk�d��S|�d�k�r{�d��S|�S(���Ni����u���hhu���1234(���i����i����(���i����i����(���u���fcntlu���termiosu���structu���unpacku���ioctlu ���TIOCGWINSZu���None(���u���fdu���fcntlu���termiosu���structu���cr(����(����u!���/tmp/pip-zej_zi-build/pip/util.pyu ���ioctl_GWINSZ��s����      u'���get_terminal_size.<locals>.ioctl_GWINSZi����i���i���u���LINESi���u���COLUMNSiP���(���u���osu���openu���ctermidu���O_RDONLYu���closeu���environu���getu���int(���u ���ioctl_GWINSZu���cru���fd(����(����u!���/tmp/pip-zej_zi-build/pip/util.pyu���get_terminal_size��s���� $ -c��������������C���s ���t��j�d��}��t��j�|���|��S(���uB���Get the current umask which involves having to set it temporarily.i����(���u���osu���umask(���u���mask(����(����u!���/tmp/pip-zej_zi-build/pip/util.pyu ���current_umask��s���� u ���current_umaskc������� ������C���s��t��j�j�|��s"�t��j�|��n��t�|��d��}�z}t�j�|��}�t�|�j����oX�|�}�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��r1t��j�j�| ��st��j�| ��qqh�t�| �d��} �z�| �j�|��Wd�| �j���|�j�d�?} �| �rt�j�| ��r| �d�@rt��j�| �d �t���d�B�n��Xqh�WWd�|�j���Xd�S( ���u�� 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. u���rbi���u���/u���\u���wbNi���iI���i��(���u���osu���pathu���existsu���makedirsu���openu���zipfileu���ZipFileu���has_leading_diru���namelistu���infolistu���filenameu���readu���split_leading_diru���joinu���dirnameu���endswithu���writeu���closeu ���external_attru���statu���S_ISREGu���chmodu ���current_umask( ���u���filenameu���locationu���flattenu���zipfpu���zipu���leadingu���infou���nameu���datau���fnu���diru���fpu���mode(����(����u!���/tmp/pip-zej_zi-build/pip/util.pyu ���unzip_file��s6����    'c������� ������C���s��t��j�j�|��s"�t��j�|��n��|��j���j�d��sL�|��j���j�d��rU�d�}�nh�|��j���j�d��s�|��j���j�d��r�d�}�n5�|��j���j�d��r�d�}�n�t�j�d �|���d �}�t�j �|��|��}�zt �d �d ���|�j ���D��}�x|�j ���D]}�|�j �}�|�d �k�rq�n��|�r8t �|��d�}�n��t��j�j�|�|��}�|�j���r~t��j�j�|��st��j�|��qq�|�j���ry�|�j�|�|��Wqt�j���d�}�t�j�d�|��|�j �|�f��w�YqXq�y�|�j�|��} �WnH�t�t�f�k �r9t�j���d�}�t�j�d�|��|�j �|�f��w�Yn�Xt��j�j�t��j�j�|���stt��j�t��j�j�|���n��t �|�d��} �z�t�j�| �| ��Wd�| �j���X| �j���|�j�d�@r�t��j�|�d�t���d�B�q�q�WWd�|�j���Xd�S(���u�� 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. u���.gzu���.tgzu���r:gzu���.bz2u���.tbzu���r:bz2u���.taru���ru-���Cannot determine compression type for file %su���r:*c�������������S���s(���g��|��]�}�|�j��d��k�r�|�j���q�S(���u���pax_global_header(���u���name(���u���.0u���member(����(����u!���/tmp/pip-zej_zi-build/pip/util.pyu ���<listcomp>$��s��� �u���untar_file.<locals>.<listcomp>u���pax_global_headeri���u/���In the tar file %s the member %s is invalid: %su���wbNiI���i��(���u���osu���pathu���existsu���makedirsu���loweru���endswithu���loggeru���warnu���tarfileu���openu���has_leading_diru ���getmembersu���nameu���split_leading_diru���joinu���isdiru���issymu���_extract_memberu���sysu���exc_infou ���extractfileu���KeyErroru���AttributeErroru���dirnameu���shutilu ���copyfileobju���closeu���modeu���chmodu ���current_umask( ���u���filenameu���locationu���modeu���taru���leadingu���memberu���fnu���pathu���eu���fpu���destfp(����(����u!���/tmp/pip-zej_zi-build/pip/util.pyu ���untar_file ��sf���� * *          &c�������������C���s@���t��j�d�8_�t��j�d�|���t��j�d�7_�t�j�|���d��S(���Ni���u&���Creating supposed download cache at %s(���u���loggeru���indentu���notifyu���osu���makedirs(���u���folder(����(����u!���/tmp/pip-zej_zi-build/pip/util.pyu���create_download_cache_folderX��s����c�������������C���sU���t��j�d�t�|����t�j�|�|���t�|��d�d��}�|�j�|��|�j���d��S(���Nu���Storing download in cache at %su ���.content-typeu���w(���u���loggeru���notifyu ���display_pathu���shutilu���copyfileu���openu���writeu���close(���u ���target_fileu ���temp_locationu ���content_typeu���fp(����(����u!���/tmp/pip-zej_zi-build/pip/util.pyu���cache_download_��s ���� c���������� ���C���sC��t��j�j�|���}��|�d�k�sZ�|��j�d��sZ�|��j�d��sZ�|��j�d��sZ�t�j�|���rz�t�|��|�d�|��j�d�� n�|�d�k�s�t�j�|���s�t �|���d�j ���d�k�r�t �|��|��n~�|�r|�j �d ��rt �t�|����rd�d�l�m�}�|�d�|�j��j�|��n*�t�j�d�|��|�|�f��t�d�|���d��S(���Nu���application/zipu���.zipu ���.pybundleu���.whlu���flattenu���application/x-gzipi���u���.taru���.tar.gzu���.tar.bz2u���.tgzu���.tbzu ���text/htmli����(���u ���Subversionu���svn+uZ���Cannot unpack file %s (downloaded from %s, content-type: %s); cannot detect archive formatu%���Cannot determine archive format of %s(���u ���.pybundleu���.whl(���u���.taru���.tar.gzu���.tar.bz2u���.tgzu���.tbz(���u���osu���pathu���realpathu���endswithu���zipfileu ���is_zipfileu ���unzip_fileu���tarfileu ���is_tarfileu���splitextu���loweru ���untar_fileu ���startswithu ���is_svn_pageu ���file_contentsu���pip.vcs.subversionu ���Subversionu���urlu���unpacku���loggeru���fatalu���InstallationError(���u���filenameu���locationu ���content_typeu���linku ���Subversion(����(����u!���/tmp/pip-zej_zi-build/pip/util.pyu ���unpack_fileg��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 �rNt�j���d �} �t�j�d�| �|�f����Yn�Xg��}�| �d��k �r| �j�} �x�t�| �j����}�|�sPn��|�j���}�|�j�|�d��|�r|�|��}�t�|�t��r|�\�}�}�n��t�j�|�|��t�j�|��st�j���qqmt�j�|��qmn!�| �j���\�}�}�|�p3d�g�}�| �j���| �j�r|�r|�rt�j�d�|��t�j�d�j�|��d��n��t�d�|�| �j�|�f���qt�j �d�|�| �j�|�f��n��| �d��k �rd�j�|��Sd��S(���Nu��� u��� u���"u���'u���"%s"u���\"u���Running command %su���stderru���stdinu���stdoutu���cwdu���envi���u#���Error %s while executing command %su����u ���Complete output from command %s:u)��� ----------------------------------------u*���Command %s failed with error code %s in %su"���Command %s had error code %s in %s(!���u���Noneu���replaceu���appendu���joinu ���subprocessu���PIPEu���loggeru���logu���osu���environu���copyu���updateu���Popenu���STDOUTu ���Exceptionu���sysu���exc_infou���fatalu���stdoutu���console_to_stru���readlineu���rstripu ���isinstanceu���tupleu���stdout_level_matchesu ���show_progressu���infou ���communicateu���waitu ���returncodeu���notifyu���InstallationErroru���warn(���u���cmdu ���show_stdoutu ���filter_stdoutu���cwdu���raise_on_returncodeu ���command_levelu ���command_descu ���extra_environu ���cmd_partsu���partu���stdoutu���envu���procu���eu ���all_outputu���lineu���levelu���returned_stdoutu���returned_stderr(����(����u!���/tmp/pip-zej_zi-build/pip/util.pyu���call_subprocess��sp����  0          c�������������C���sE���t��j�|���}�|�d�k�r�d�St��j�|��}�t�d�d���|�D��S(���u��� Attempt to determine if this is a pre-release using PEP386/PEP426 rules. Will return True if it is a pre-release and False if not. Versions are assumed to be a pre-release if they cannot be parsed. c�������������S���s)���g��|��]�}�t��d��d���|�D���q�S(���c���������� ���S���s1���g��|��]'�}�|�t��d��d�d�d�d�g��k��q�S(���u���au���bu���cu���rcu���dev(���u���set(���u���.0u���y(����(����u!���/tmp/pip-zej_zi-build/pip/util.pyu ���<listcomp>��s��� �u,���is_prerelease.<locals>.<listcomp>.<listcomp>(���u���any(���u���.0u���x(����(����u!���/tmp/pip-zej_zi-build/pip/util.pyu ���<listcomp>��s��� �u!���is_prerelease.<locals>.<listcomp>NT(���u���versionu���_suggest_normalized_versionu���Noneu���Trueu���_normalized_keyu���any(���u���versu ���normalizedu���parsed(����(����u!���/tmp/pip-zej_zi-build/pip/util.pyu ���is_prerelease��s ���� u ���is_prereleasec�������������B���sV���|��Ee��Z�d��Z�d �d �d�d��Z�d�d���Z�d�d���Z�d�d���Z�d �d ���Z�d �S( ���u���BuildDirectoryc�������������C���sm���|�d��k�r!�|�d��k�r!�d�}�n��|�d��k�rW�t�j�d�d��}�|�d��k�rW�d�}�qW�n��|�|��_�|�|��_�d��S(���Nu���prefixu ���pip-build-T(���u���Noneu���Trueu���tempfileu���mkdtempu���nameu���delete(���u���selfu���nameu���delete(����(����u!���/tmp/pip-zej_zi-build/pip/util.pyu���__init__��s����     u���BuildDirectory.__init__c�������������C���s���d�j��|��j�j�|��j��S(���Nu ���<{} {!r}>(���u���formatu ���__class__u���__name__u���name(���u���self(����(����u!���/tmp/pip-zej_zi-build/pip/util.pyu���__repr__��s����u���BuildDirectory.__repr__c�������������C���s���|��j��S(���N(���u���name(���u���self(����(����u!���/tmp/pip-zej_zi-build/pip/util.pyu ���__enter__��s����u���BuildDirectory.__enter__c�������������C���s���|��j����d��S(���N(���u���cleanup(���u���selfu���excu���valueu���tb(����(����u!���/tmp/pip-zej_zi-build/pip/util.pyu���__exit__��s����u���BuildDirectory.__exit__c�������������C���s���|��j��r�t�|��j��n��d��S(���N(���u���deleteu���rmtreeu���name(���u���self(����(����u!���/tmp/pip-zej_zi-build/pip/util.pyu���cleanup��s���� u���BuildDirectory.cleanupN( ���u���__name__u ���__module__u ���__qualname__u���Noneu���__init__u���__repr__u ���__enter__u���__exit__u���cleanup(���u ���__locals__(����(����u!���/tmp/pip-zej_zi-build/pip/util.pyu���BuildDirectory��s ���   u���BuildDirectoryFT(���u ���setuptoolsu���pipu���pythonu ���distribute(Q���u���sysu���shutilu���osu���statu���reu ���posixpathu���zipfileu���tarfileu ���subprocessu���textwrapu���tempfileu���pip.exceptionsu���InstallationErroru ���BadCommandu���PipErroru���pip.backwardcompatu ���WindowsErroru ���string_typesu ���raw_inputu���console_to_stru ���user_siteu���PermissionErroru ���pip.locationsu ���site_packagesu���running_under_virtualenvu���virtualenv_no_globalu���pip.logu���loggeru ���pip._vendoru ���pkg_resourcesu���pip._vendor.distlibu���versionu���__all__u���get_progu���Falseu���rmtreeu���rmtree_errorhandleru ���display_pathu ���backup_diru���Noneu ���find_commandu ���get_pathextu���ask_path_existsu���asku���objectu���_Infu���Infu���compileu���Iu ���_normalize_reu���normalize_nameu ���format_sizeu���is_installable_diru ���is_svn_pageu ���file_contentsu���split_leading_diru���has_leading_diru���make_path_relativeu���normalize_pathu���splitextu���renamesu���is_localu ���dist_is_localu���dist_in_usersiteu���dist_in_site_packagesu���dist_is_editableu���Trueu���get_installed_distributionsu ���egg_link_pathu ���dist_locationu���get_terminal_sizeu ���current_umasku ���unzip_fileu ���untar_fileu���create_download_cache_folderu���cache_downloadu ���unpack_fileu���DEBUGu���call_subprocessu ���is_prereleaseu���BuildDirectory(����(����(����u!���/tmp/pip-zej_zi-build/pip/util.pyu���<module>���s���           .                    ' "   - L    ?