Edit File: download.pyo
� ��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�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�y�d��d�l�Z�e�Z�Wn�e�k �r��e�Z�n�Xd��d�l�m�Z�d��d�l�m�Z�d��d�l�Z�d��d�l�m�Z�m�Z�d��d�l�m�Z�d��d�l�m �Z �m!�Z!�m"�Z"�m#�Z#�m$�Z$�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�l0�m1�Z1�d��d�l2�m3�Z3�d��d �l4�m5�Z5�m6�Z6�d��d�l7�m8�Z8�d��d�l9�m:�Z:�d��d�l;�m<�Z<�m=�Z=�d��d�l>�m?�Z?�m@�Z@�d��d�lA�mB�ZB�mC�ZC�d��d�lD�mE�ZE�mF�ZF�d��d�lG�mH�ZH�d��d�lI�mJ�ZJ�d��d�l;�mK�ZK�d��d�lL�mM�ZM�d��d�lN�mO�ZO�d��d�lP�mQ�ZQ�d��d�lR�mS�ZS�d�d�d�d�d�d �d!�d"�d#�d$�d%�d&�d'�g �ZT�e�jU�eV���ZW�d(����ZX�d)�eB�f�d*�������YZY�d+�e?�f�d,�������YZZ�d-�eO�f�d.�������YZ[�d/�e@�f�d0�������YZ\�d1�e<�j]�f�d2�������YZ^�d�d�d3���Z`�e�ja�d4�e�jb���Zc�e�ja�d5�e�jb���Zd�d6����Ze�d7����Zf�d8����Zg�d9����Zh�d:����Zi�d;����Zj�d<����Zk�d=����Zl�d>����Zm�d?����Zn�d@����Zo�dA����Zp�d�d�d�dB���Zq�d�d�dC���Zr�dD����Zs�dE�eS�jt�f�dF�������YZu�d�e�d�d�dG���Zv�dH����Zw�dI����Zx�dJ����Zy�dK����Zz�d�S(L���i����(���t���absolute_importN(���t���parse(���t���request(���t���InstallationErrort���HashMismatch(���t���PyPI( ���t���splitextt���rmtreet���format_sizet���display_patht ���backup_dirt���ask_path_existst���unpack_filet���ARCHIVE_EXTENSIONSt���consumet���call_subprocess(���t���auto_decode(���t���check_path_owner(���t ���indent_log(���t���SETUPTOOLS_SHIM(���t���libc_ver(���t���DownloadProgressBart���DownloadProgressSpinner(���t���write_delete_marker_file(���t���vcs(���t���requestst���six(���t���BaseAdaptert���HTTPAdapter(���t���AuthBaset ���HTTPBasicAuth(���t���CONTENT_CHUNK_SIZEt���Response(���t���get_netrc_auth(���t���CaseInsensitiveDict(���t���urllib3(���t���CacheControlAdapter(���t ���FileCache(���t ���LockError(���t ���xmlrpc_clientt���get_file_contentt���is_urlt���url_to_patht���path_to_urlt���is_archive_filet���unpack_vcs_linkt���unpack_file_urlt ���is_vcs_urlt���is_file_urlt���unpack_http_urlt ���unpack_urlt���parse_content_dispositiont���sanitize_content_filenamec������� ���C@��s���i�i�d�d�6t��j�d�6d�6t�j����d�6i�t�j����d�6d�6}��|��d�d�d�k�rj�t�j����|��d�d�<n��|��d�d�d�k�r��t�j�j�d �k�r��t�j�d � }�n �t�j�}�d�j�g��|�D]�}�t �|���^�q����|��d�d�<nV�|��d�d�d�k�rt�j����|��d�d�<n+�|��d�d�d �k�r2t�j����|��d�d�<n��t�j�j �d���r�d�d�l�m�}�t �t�d����t�d�d�d�g�|�j����������}�t �t�d����t�d�d�g�t����������}�|�r�|�|�d�<n��|�r�|�|��d�<q�n��t�j�j �d���rt�j����d�ri�d�d�6t�j����d�d�6|��d�<n��t�j����rIt�j����|��j�d�i����d�<n��t�j����rtt�j����|��j�d�i����d�<n��t�j����r�t�j����|��d�<n��t�r�t�j�d� d&�k�r�t�j�|��d�<n��d�j�d �|��d!�t�j�|��d"�d'�d%�t����S((���s6��� Return a string representing the user agent. t���pipt���namet���versiont ���installert���pythont���implementationt���CPythont���PyPyt���finali���t���.t���Jythont ���IronPythont���linuxi����(���t���distroc���������S@��s���|��d�S(���Ni���(����(���t���x(����(����s0���/usr/lib/python2.7/site-packages/pip/download.pyt���<lambda>`���t����t���idc���������S@��s���|��d�S(���Ni���(����(���RC���(����(����s0���/usr/lib/python2.7/site-packages/pip/download.pyRD���d���RE���t���libt���libcRB���t���darwint���macOSt���systemt���releaset���cpui���i���t���openssl_versions9���{data[installer][name]}/{data[installer][version]} {json}t���datat���jsont ���separatorst���,t���:t ���sort_keys(���i���i���(���RR���RS���(���R5���t���__version__t���platformt���python_versiont���python_implementationt���syst���pypy_version_infot���releaselevelt���joint���strt ���startswitht���pip._vendorRB���t���dictt���filtert���zipt���linux_distributionR���t���mac_verRK���t ���setdefaultRL���t���machinet���HAS_TLSt���version_infot���sslt���OPENSSL_VERSIONt���formatRP���t���dumpst���True(���RO���RZ���RC���RB���t���distro_infosRH���(����(����s0���/usr/lib/python2.7/site-packages/pip/download.pyt ���user_agent@���sT���� -$ "% t���MultiDomainBasicAuthc�����������B@��s/���e��Z�e�d����Z�d����Z�d����Z�d����Z�RS(���c���������C@��s���|�|��_��i��|��_�d��S(���N(���t ���promptingt ���passwords(���t���selfRq���(����(����s0���/usr/lib/python2.7/site-packages/pip/download.pyt���__init__����s���� c���������C@��s.��t��j�|�j���}�|�j�j�d�d���d�}�t��j�|�d� |�f�|�d���|�_�|��j�j�|�d���\�}�}�|�d��k�r��|��j �|�j���\�}�}�n��|�d��k�r��|�d��k�r��t �|�j���}�|�r��|�n�d�\�}�}�n��|�s��|�r|�|�f�|��j�|�<t�|�p��d�|�pd���|���}�n��|�j�d�|��j ���|�S( ���Nt���@i���i����i���RE���t���response(���NN(���NN(���t���urllib_parset���urlparset���urlt���netloct���rsplitt ���urlunparseRr���t���gett���Nonet���parse_credentialsR!���R���t ���register_hookt ���handle_401(���Rs���t���reqt���parsedRz���t���usernamet���passwordt ���netrc_auth(����(����s0���/usr/lib/python2.7/site-packages/pip/download.pyt���__call__����s����%$c���������K@��s����|�j��d�k�r�|�S|��j�s �|�St�j�|�j���}�t�j�j�d�|�j���}�t �j �d���}�|�sf�|�r�|�|�f�|��j �|�j�<n��|�j�|�j�j ����t�|�p��d�|�p��d���|�j���}�|�j�j�|�|���}�|�j�j�|���|�S(���Ni���s ���User for %s: s ���Password: RE���(���t���status_codeRq���Rw���Rx���Ry���R���t���movest���inputRz���t���getpassRr���t���contentt���rawt���release_connR���R���t ���connectiont���sendt���historyt���append(���Rs���t���respt���kwargsR����R����R����R����t���new_resp(����(����s0���/usr/lib/python2.7/site-packages/pip/download.pyR��������s���� $c���������C@��sL���d�|�k�rH�|�j��d�d���d�}�d�|�k�r>�|�j�d�d���S|�d��f�Sd�S(���NRu���i���i����RS���(���NN(���R{���t���splitR~���(���Rs���Rz���t���userinfo(����(����s0���/usr/lib/python2.7/site-packages/pip/download.pyR�������s���� (���t���__name__t ���__module__Rm���Rt���R����R����R���(����(����(����s0���/usr/lib/python2.7/site-packages/pip/download.pyRp�������s��� ! "t���LocalFSAdapterc�����������B@��s)���e��Z�d�d�d�d�d�d����Z�d����Z�RS(���c��� ������C@��s����t��|�j���}�t����}�d�|�_�|�j�|�_�y�t�j�|���} �Wn%�t�k �rg�} �d�|�_�| �|�_�n}�Xt�j �j �| �j�d�t��}�t �j�|���d�p��d�}�t�i�|�d�6| �j�d�6|�d�6��|�_�t�|�d ���|�_�|�j�j�|�_�|�S( ���Ni����i���t���usegmti����s ���text/plains���Content-Types���Content-Lengths ���Last-Modifiedt���rb(���R*���Ry���R ���R����t���ost���statt���OSErrorR����t���emailt���utilst ���formatdatet���st_mtimeRm���t ���mimetypest ���guess_typeR"���t���st_sizet���headerst���opent���close( ���Rs���R���t���streamt���timeoutt���verifyt���certt���proxiest���pathnameR����t���statst���exct���modifiedt���content_type(����(����s0���/usr/lib/python2.7/site-packages/pip/download.pyR��������s$���� c���������C@��s���d��S(���N(����(���Rs���(����(����s0���/usr/lib/python2.7/site-packages/pip/download.pyR��������s����N(���R����R����R~���R����R����(����(����(����s0���/usr/lib/python2.7/site-packages/pip/download.pyR��������s���t ���SafeFileCachec�����������B@��s2���e��Z�d��Z�d����Z�d����Z�d����Z�d����Z�RS(���sw��� A file based cache which is safe to use even when the target directory may not be accessible or writable. c���������O@��sK���t��t�|����j�|�|����t�|��j���sG�t�j�d�|��j���d��|��_�n��d��S(���Ns����The directory '%s' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.(���t���superR����Rt���R���t ���directoryt���loggert���warningR~���(���Rs���t���argsR����(����(����s0���/usr/lib/python2.7/site-packages/pip/download.pyRt�������s���� c���������O@��sQ���|��j��d��k�r�d��Sy�t�t�|����j�|�|����SWn�t�t�t�f�k �rL�n�Xd��S(���N(���R����R~���R����R����R}���R&���R����t���IOError(���Rs���R����R����(����(����s0���/usr/lib/python2.7/site-packages/pip/download.pyR}�����s����c���������O@��sQ���|��j��d��k�r�d��Sy�t�t�|����j�|�|����SWn�t�t�t�f�k �rL�n�Xd��S(���N(���R����R~���R����R����t���setR&���R����R����(���Rs���R����R����(����(����s0���/usr/lib/python2.7/site-packages/pip/download.pyR������s����c���������O@��sQ���|��j��d��k�r�d��Sy�t�t�|����j�|�|����SWn�t�t�t�f�k �rL�n�Xd��S(���N(���R����R~���R����R����t���deleteR&���R����R����(���Rs���R����R����(����(����s0���/usr/lib/python2.7/site-packages/pip/download.pyR����)��s����(���R����R����t���__doc__Rt���R}���R����R����(����(����(����s0���/usr/lib/python2.7/site-packages/pip/download.pyR��������s ��� t���InsecureHTTPAdapterc�����������B@��s���e��Z�d�����Z�RS(���c���������C@��s���d�|�_��d��|�_�d��S(���Nt ���CERT_NONE(���t ���cert_reqsR~���t���ca_certs(���Rs���t���connRy���R����R����(����(����s0���/usr/lib/python2.7/site-packages/pip/download.pyt���cert_verify9��s���� (���R����R����R����(����(����(����s0���/usr/lib/python2.7/site-packages/pip/download.pyR����7��s���t ���PipSessionc�����������B@��s ���e��Z�d�Z�d�����Z�d����Z�RS(���c��� ������O@��s5��|�j��d�d���}�|�j��d�d����}�|�j��d�g����}�t�t�|����j�|�|����t����|��j�d�<t����|��_�t �j �d�|�d�d�g�d �d ���}�|�r��t�d�t�|�d�t ��d�|���}�n�t�d�|���}�t�d�|���}�|��j�d �|���|��j�d�|���|��j�d�t������x'�|�D]�}�|��j�d�j�|���|���qWd��S(���Nt���retriesi����t���cachet���insecure_hostss ���User-Agentt���totalt���status_forcelisti���t���backoff_factorg�������?t���use_dir_lockt���max_retriess���https://s���http://s���file://s���https://{0}/(���t���popR~���R����R����Rt���Ro���R����Rp���t���authR#���t���RetryR$���R����Rm���R���R����t���mountR����Rk���( ���Rs���R����R����R����R����R����t���secure_adaptert���insecure_adaptert���host(����(����s0���/usr/lib/python2.7/site-packages/pip/download.pyRt���B��s*���� c���������O@��s2���|�j��d�|��j���t�t�|����j�|�|�|�|���S(���NR����(���Re���R����R����R����R���(���Rs���t���methodRy���R����R����(����(����s0���/usr/lib/python2.7/site-packages/pip/download.pyR���~��s����N(���R����R����R~���R����Rt���R���(����(����(����s0���/usr/lib/python2.7/site-packages/pip/download.pyR����>��s��� <c��� ������C@��s���|�d�k�r�t�d�����n��t�j�|����}�|�r[|�j�d���j����}�|�d�k�r�|�r�|�j�d���r�t�d�|�|��f�����n��|�d�k�r/|��j�d�d���d�}�|�j �d�d���}�t �j�|���}�|�r��|�j�d���d�|�j�d �d���d�}�n��t�j �|���}�|�j�d���r&d�|�j�d���}�n��|�}��q[|�j�|����}�|�j����|�j�|�j�f�Sn��y.�t�|��d �����}�t�|�j������}�Wd�QXWn)�t�k �r�} �t�d�t�| �������n�X|��|�f�S( ���s����Gets the content of a file; it may be a filename, file: URL, or http: URL. Returns (location, content). Content is unicode.sA���get_file_content() missing 1 required keyword argument: 'session'i���t���filet���https6���Requirements file %s references URL %s, which is localRS���s���\t���/t���|R����Ns$���Could not open requirements file: %s(���R~���t ���TypeErrort ���_scheme_ret���searcht���groupt���lowerR^���R���R����t���replacet���_url_slash_drive_ret���matchRw���t���unquotet���lstripR}���t���raise_for_statusRy���t���textR����R���t���readR����R]���( ���Ry���t ���comes_fromt���sessionR����t���schemet���pathR����t���fR����R����(����(����s0���/usr/lib/python2.7/site-packages/pip/download.pyR(������s>����* s���^(http|https|file):s���/*([a-z])\|c���������C@��sI���d�|��k�r�t��S|��j�d�d���d�j����}�|�d�d�d�d�g�t�j�k�S(���s)���Returns true if the name looks like a URLRS���i���i����R����t���httpsR����t���ftp(���t���FalseR����R����R���t���all_schemes(���R6���R����(����(����s0���/usr/lib/python2.7/site-packages/pip/download.pyR)������s����c���������C@��sH���t��j�|����\�}�}�}�}�}�|�r1�d�|�}�n��t�j�|�|���}�|�S(���s(��� Convert a file: URL to a path. s���\\(���Rw���t���urlsplitt���urllib_requestt���url2pathname(���Ry���t���_Rz���R����(����(����s0���/usr/lib/python2.7/site-packages/pip/download.pyR*������s ���� c���������C@��s=���t��j�j�t��j�j�|������}��t�j�d�t�j�|������}�|�S(���sh��� Convert a path to a file: URL. The path will be made absolute and have quoted path parts. s���file:(���R����R����t���normpatht���abspathRw���t���urljoinR����t���pathname2url(���R����Ry���(����(����s0���/usr/lib/python2.7/site-packages/pip/download.pyR+������s����c���������C@��s*���t��|����d�j����}�|�t�k�r&�t�St�S(���s9���Return True if `name` is a considered as an archive file.i���(���R���R����R ���Rm���R����(���R6���t���ext(����(����s0���/usr/lib/python2.7/site-packages/pip/download.pyR,������s����c���������C@��s���t��|����}�|�j�|���d��S(���N(���t���_get_used_vcs_backendt���unpack(���t���linkt���locationt���vcs_backend(����(����s0���/usr/lib/python2.7/site-packages/pip/download.pyR-������s����c���������C@��s=���x6�t��j�D]+�}�|��j�|�j�k�r �|�|��j���}�|�Sq �Wd��S(���N(���R���t���backendsR����t���schemesRy���(���R����t���backendR����(����(����s0���/usr/lib/python2.7/site-packages/pip/download.pyR�������s����c���������C@��s���t��t�|������S(���N(���t���boolR����(���R����(����(����s0���/usr/lib/python2.7/site-packages/pip/download.pyR/������s����c���������C@��s���|��j��j����j�d���S(���Ns���file:(���Ry���R����R^���(���R����(����(����s0���/usr/lib/python2.7/site-packages/pip/download.pyR0������s����c���������C@��s���t��|��j���}�t�j�j�|���S(���s����Return whether a file:// Link points to a directory. ``link`` must not have any other scheme but file://. Call is_file_url() first. (���R*���t���url_without_fragmentR����R����t���isdir(���R����t ���link_path(����(����s0���/usr/lib/python2.7/site-packages/pip/download.pyt ���is_dir_url���s����c���������O@��s���|��S(���N(����(���t���iterableR����R����(����(����s0���/usr/lib/python2.7/site-packages/pip/download.pyt���_progress_indicator���s����c��� ������@��s���y�t����j�d���}�Wn �t�t�t�f�k �r9�d�}�n�Xt���d�t���}�t�j����t �j �k�rj�t�}�n9�|�ry�t�}�n*�|�d �k�r��t�}�n�|�s��t�}�n�t�}�|�j�}���f�d����}����f�d����} �t �} �|�j�t�j�k�r��|�}�n �|�j�}�|�rM|�r.t�j�d�|�t�|�����t�d �|���j�} �qvt�j�d �|���t����j�} �n)�|�rft�j�d�|���n�t�j�d �|���t�j�d�|���| �| �|�t���t�����}�|�r�|�j�|���n �t�|���d��S(���Ns���content-lengthi����t ���from_cachei(���i���c���������3@��sr���y,�x%����j��j�|��d�t��D]�}�|�Vq�WWn?�t�k �rm�x/�t�ri����j��j�|����}�|�sa�Pn��|�Vq?�Wn�Xd��S(���Nt���decode_content(���R����R����R����t���AttributeErrorRm���R����(���t ���chunk_sizet���chunk(���R����(����s0���/usr/lib/python2.7/site-packages/pip/download.pyt ���resp_read��s���� c���������3@��s'���x �|��D]�}����j��|���|�Vq�Wd��S(���N(���t���write(���t���chunksR��(���t���content_file(����s0���/usr/lib/python2.7/site-packages/pip/download.pyt���written_chunks;��s���� s���Downloading %s (%s)t���maxs���Downloading %ss���Using cached %ss���Downloading from URL %si@���(���t���intR����t ���ValueErrort���KeyErrorR����t���getattrR����R����t���getEffectiveLevelt���loggingt���INFORm���t���show_urlR��Rz���R���R��t���infoR���R���t���iterR���t���debugR���t���check_against_chunksR���( ���R����R����R��t���hashest���total_lengtht���cached_respt ���show_progressR��R��R��t���progress_indicatorRy���t���downloaded_chunks(����(���R��R����s0���/usr/lib/python2.7/site-packages/pip/download.pyt ���_download_url��sL���� % c���������C@��s,��t��}�t�j�j�|�|�j���}�t�j�j�|���r��t�d�t�|���d ���}�|�d�k�r^�t�}�q��|�d�k�r��t �j �d�t�|�����t�j�|���q��|�d�k�r��t�|���}�t �j �d�t�|���t�|�����t �j�|�|���q��|�d�k�r��t�j�d���q��n��|�r(t �j�|��|���t �j�d �t�|�����n��d��S(���Ns8���The file %s exists. (i)gnore, (w)ipe, (b)ackup, (a)abortt���it���wt���bt���as���Deleting %ss���Backing up %s to %si����s���Saved %s(���R%��R&��R'��R(��(���Rm���R����R����R\���t���filenamet���existsR���R ���R����R����R����t���removeR ���t���shutilt���moveRY���t���exitt���copyR��(���R)��R����R����R/��t���download_locationRv���t ���dest_file(����(����s0���/usr/lib/python2.7/site-packages/pip/download.pyt ���_copy_filea��s.���� c��� ������C@��s����|�d��k�r�t�d�����n��t�j�d�d���}�d��}�|�rN�t�|��|�|���}�n��|�rp�|�}�t�j�|���d�}�n�t�|��|�|�|���\�}�}�t�|�|�|�|����|�r��|�r��t �|�|�|����n��|�s��t �j�|���n��t�|���d��S(���Ns@���unpack_http_url() missing 1 required keyword argument: 'session's���-unpacks���pip-i����( ���R~���R����t���tempfilet���mkdtempt���_check_download_dirR����R����t���_download_http_urlR���R2��R����t���unlinkR���( ���R����R����t���download_dirR����R��t���temp_dirt���already_downloaded_patht ���from_pathR����(����(����s0���/usr/lib/python2.7/site-packages/pip/download.pyR1���|��s,���� c���������C@��s���t��|��j���}�t�|����rj�t�j�j�|���r:�t�|���n��t�j�|�|�d�t ��|�rf�t �j�d���n��d�S|�r��|�j�|���n��d�}�|�r��t�|��|�|���}�n��|�r��|�}�n�|�}�t�j�|���d�}�t�|�|�|�|����|�r��|�r��t�|�|�|����n��d�S(���s����Unpack link into location. If download_dir is provided and link points to a file, make a copy of the link file inside download_dir. t���symlinkss*���Link is a directory, ignoring download_dirNi����(���R*���R��R��R����R����R��R���R,��t���copytreeRm���R����R��t���check_against_pathR~���R5��R����R����R���R2��(���R����R����R8��R��R��R:��R;��R����(����(����s0���/usr/lib/python2.7/site-packages/pip/download.pyR.������s,���� c������ ���C@��s����t��j�j�|���r�t�|���n��d�}�t�j�g�}�|�j�d���|�j�t�|���|�j�d���|�d�|�g�7}�t�j �d�|����t ������t�|�d�|��d�t��Wd�QXt��j�j �|�t��j�|���d ���}�t�j �d �|�|���t�|�|�d�d�d�d��d�S( ���s����Copy distribution files in `link_path` to `location`. Invoked when user requests to install a local directory. E.g.: pip install . pip install ~/dev/git-repos/python-prompt-toolkit s���setup.pys���-ct���sdists ���--dist-dirs���Running setup.py sdist for %st���cwdt���show_stdoutNi����s���Unpacking sdist %s into %sR����R����(���R����R����R��R���RY���t ���executableR����R���R����R��R���R���R����R\���t���listdirR���R~���(���R��R����t���setup_pyt ���sdist_argsR?��(����(����s0���/usr/lib/python2.7/site-packages/pip/download.pyt���_copy_dist_from_dir���s���� "t���PipXmlrpcTransportc�����������B@��s&���e��Z�d��Z�e�d���Z�e�d���Z�RS(���sR���Provide a `xmlrpclib.Transport` implementation via a `PipSession` object. c���������C@��s;���t��j�j�|��|���t�j�|���}�|�j�|��_�|�|��_�d��S(���N(���R'���t ���TransportRt���Rw���Rx���R����t���_schemet���_session(���Rs���t ���index_urlR����t���use_datetimet���index_parts(����(����s0���/usr/lib/python2.7/site-packages/pip/download.pyRt������s����c��� ������C@��s����|��j��|�|�d��d��d��f�}�t�j�|���}�yX�i�d�d�6}�|��j�j�|�d�|�d�|�d�t��}�|�j����|�|��_�|��j �|�j ���SWn2�t�j�k �r��} �t �j�d�| �j�j�|������n�Xd��S(���Ns���text/xmls���Content-TypeRO���R����R����s���HTTP error %s while getting %s(���RI��R~���Rw���R|���RJ��t���postRm���R����t���verboset���parse_responseR����R���t ���HTTPErrorR����t���criticalRv���R����( ���Rs���R����t���handlert���request_bodyRO��t���partsRy���R����Rv���R����(����(����s0���/usr/lib/python2.7/site-packages/pip/download.pyR�����s���� (���R����R����R����R����Rt���R���(����(����(����s0���/usr/lib/python2.7/site-packages/pip/download.pyRG�����s���c���������C@��s����t��|����r�t�|��|���nV�t�|����rA�t�|��|�|�d�|��n1�|�d�k�rY�t����}�n��t�|��|�|�|�d�|��|�r��t�|���n��d�S(���sv��Unpack link. If link is a VCS link: if only_download, export into download_dir and ignore location else unpack into location for other types of link: - unpack into location - if download_dir, copy the file into download_dir - if only_download, mark location for deletion :param hashes: A Hashes object, one of whose embedded hashes must match, or HashMismatch will be raised. If the Hashes is empty, no matches are required, and unhashable types of requirements (like VCS ones, which would ordinarily raise HashUnsupported) are allowed. R��N(���R/���R-���R0���R.���R~���R����R1���R���(���R����R����R8��t ���only_downloadR����R��(����(����s0���/usr/lib/python2.7/site-packages/pip/download.pyR2�����s����c���������C@��s���t��j�j�|����S(���sJ��� Sanitize the "filename" value from a Content-Disposition header. (���R����R����t���basename(���R)��(����(����s0���/usr/lib/python2.7/site-packages/pip/download.pyR4���<��s����c���������C@��sC���t��j�|����\�}�}�|�j�d���}�|�r9�t�|���}�n��|�pB�|�S(���s���� Parse the "filename" value from a Content-Disposition header, and return the default filename if the result is empty. R)��(���t���cgit���parse_headerR}���R4���(���t���content_dispositiont���default_filenamet���_typet���paramsR)��(����(����s0���/usr/lib/python2.7/site-packages/pip/download.pyR3���D��s ����c��� ��� ���C@��s���|��j��j�d�d���d�}�y0�|�j�|�d�i�d�d�6d�t��}�|�j����Wn2�t�j�k �r}�}�t�j�d�|�j �j �|�������n�X|�j�j�d �d ���}�|��j�}�|�j�j�d���} �| �r��t �| �|���}�n��t�|���d�} �| �st�j�|���} �| �r|�| �7}�qn��| �rI|��j��|�j��k�rIt�j�j�|�j����d�} �| �rI|�| �7}�qIn��t�j�j�|�|���}�t�|�d�����}�t�|�|��|�|���Wd �QX|�|�f�S(���s6���Download link url into temp_dir using provided sessiont���#i���i����R����t���identitys���Accept-EncodingR����s���HTTP error %s while getting %ss���content-typeRE���s���content-dispositiont���wbN(���Ry���R����R}���Rm���R����R���RQ��R����RR��Rv���R����R����R)��R3���R���R����t���guess_extensionR����R����R\���R����R$��( ���R����R����R9��R��t ���target_urlR����R����R����R)��RZ��R����t ���file_pathR��(����(����s0���/usr/lib/python2.7/site-packages/pip/download.pyR6��S��s:���� c���������C@��s����t��j�j�|�|��j���}�t��j�j�|���r��t�j�d�|���|�r��y�|�j�|���Wq��t�k �r��t�j �d�|���t��j �|���d�SXn��|�Sd�S(���s���� Check download_dir for previously downloaded file with correct hash If a correct file is found return its path else None s���File was already downloaded %ss;���Previously-downloaded file %s has bad hash. Re-downloading.N(���R����R����R\���R)��R*��R����R��R>��R���R����R7��R~���(���R����R8��R��t ���download_path(����(����s0���/usr/lib/python2.7/site-packages/pip/download.pyR5�����s���� ({���t ���__future__R����RX��t���email.utilsR����R����RP���R��R����R����RV���t���reR,��RY���R3��Ri���Rm���Rg���t���ImportErrorR����t���pip._vendor.six.moves.urllibR���Rw���R���R����R5���t���pip.exceptionsR���R���t ���pip.modelsR���t ���pip.utilsR���R���R���R ���R ���R���R���R ���R���R���t���pip.utils.encodingR���t���pip.utils.filesystemR���t���pip.utils.loggingR���t���pip.utils.setuptools_buildR���t���pip.utils.glibcR���t���pip.utils.uiR���R���t ���pip.locationsR���t���pip.vcsR���R_���R���R���t���pip._vendor.requests.adaptersR���R���t���pip._vendor.requests.authR���R���t���pip._vendor.requests.modelsR���R ���t���pip._vendor.requests.utilsR!���t���pip._vendor.requests.structuresR"���R#���t���pip._vendor.cachecontrolR$���t���pip._vendor.cachecontrol.cachesR%���t���pip._vendor.lockfileR&���t���pip._vendor.six.movesR'���t���__all__t ���getLoggerR����R����Ro���Rp���R����R����R����t���SessionR����R~���R(���t���compilet���IR����R����R)���R*���R+���R,���R-���R����R/���R0���R��R��R$��R2��R1���R.���RF��RH��RG��R2���R4���R3���R6��R5��(����(����(����s0���/usr/lib/python2.7/site-packages/pip/download.pyt���<module>���s���� F BR!BH) ` &0 $' 8