ž 7’Re$bc@s®ddlZddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddl m Z m Z mZddlmZmZmZmZmZmZddlmZmZmZddlmZddlmZddlmZdd d d d d ddddddddddddddddddd gZ d!d„Z!d]d"d„Z#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/d0ej0ƒZ1d1d„Z2d2d„Z3d3d„Z4d4d„Z5d5d„Z6d6d„Z7d7d„Z8d8d„Z9d9d„Z:d:d„Z;d;d„Z<d<d=„Z=d>d?„Z>d@dA„Z?dBdC„Z@dDdE„ZAd^d_d^d]dJdK„ZCdLdM„ZDdNdO„ZEdPd„ZFdQdR„ZGd^dSd„ZHdTd„ZIdUd„ZJdVd„ZKdWd„ZLd^ddd^ejMdddXd „ZNdYdZ„ZOGd[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.tjjtjdƒdkr-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|dtƒdS(Nu ignore_errorsuonerror(ushutilurmtreeurmtree_errorhandler(udiru ignore_errors((u!/tmp/pip-zej_zi-build/pip/util.pyurmtree*scCsÂ|dd…\}}|tkr5|jddkpp|tkrT|jddkpp|tkop|jddksy‚ntj|ƒjtj@tjkr¡‚ntj|tj ƒ||ƒdS(uÑ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.Niiii i( u WindowsErroruargsuOSErroruPermissionErroruosustatust_modeuS_IREADuchmoduS_IWRITE(ufuncupathuexc_infouexctypeuvalue((u!/tmp/pip-zej_zi-build/pip/util.pyurmtree_errorhandler/s"urmtree_errorhandlercCsdtjjtjj|ƒƒ}|jtjƒtjjƒr`d|ttjƒƒd…}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|dkr0tjjddƒjtjƒ}nt|tƒrK|g}n|dkrctƒ}ndd„|j ƒjtjƒDƒ}tj j |ƒdj ƒ|kr¶dg}nxj|D]b}tj j ||ƒ}x.|D]&}||}tj j |ƒrß|SqßWtj j |ƒr½|Sq½Wtd|ƒ‚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_pathextcCsCx3tjjddƒjƒD]}||kr|SqWt||ƒS(NuPIP_EXISTS_ACTIONu(uosuenvironugetusplituask(umessageuoptionsuaction((u!/tmp/pip-zej_zi-build/pip/util.pyuask_path_existsys" uask_path_existscCs}xvtjjdƒr(td|ƒ‚nt|ƒ}|jƒjƒ}||krrtd|dj|ƒfƒq|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.pyuask€s  cBsn|EeZdZdZdd„Zdd„Zdd„Zdd „Zd d „Zd d „Z dd„Z 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_InfŽs      u_Infu[^a-z]cCstjd|jƒƒS(Nu-(u _normalize_reusubulower(uname((u!/tmp/pip-zej_zi-build/pip/util.pyunormalize_name±scCsX|dkrd|ddS|d kr4d|dS|dkrLd|dSd|SdS( Nièu%.1fMBg@@i u%ikBu%.1fkBu%ibytesi@Bi'((ubytes((u!/tmp/pip-zej_zi-build/pip/util.pyu format_sizeµs     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_dirÀs cCs(tjd|ƒo'tjd|tjƒS(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���Niüÿÿÿiüÿÿÿ(���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�| �ƒ�s©t��j�| �ƒ�q©qh�t�| �d�ƒ�} �z�| �j�|�ƒ�Wd�| �j�ƒ��|�j�d�?} �| �r¨t�j�| �ƒ�r¨| �d�@r¨t��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�|�ƒ�sÚt��j�|�ƒ�qÚqþ�|�j�ƒ��rÜy�|�j�|�|�ƒ�WqÚt�j�ƒ��d�}�t�j�d�|��|�j �|�f�ƒ�wþ�YqÚXqþ�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�ƒ��ƒ�}�|�s‰Pn��|�j�ƒ��}�|�j�|�d�ƒ�|�r|�|�ƒ�}�t�|�t�ƒ�rÖ|�\�}�}�n��t�j�|�|�ƒ�t�j�|�ƒ�st�j�ƒ��qqmt�j�|�ƒ�qmn!�| �j�ƒ��\�}�}�|�p3d�g�}�| �j�ƒ��| �j�rÅ|�r¥|�r†t�j�d�|�ƒ�t�j�d�j�|�ƒ�d�ƒ�n��t�d�|�| �j�|�f�ƒ�‚�qÅt�j �d�|�| �j�|�f�ƒ�n��| �d��k �rÞd�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    ?