/usr/lib/python2.6/site-packages/pip-8.1.1-py2.6.egg/pip
NameSizeModeActions
commands/-0755rm
compat/-0755rm
models/-0755rm
operations/-0755rm
req/-0755rm
utils/-0755rm
vcs/-0755rm
_vendor/-0755rm
basecommand.py114290644editdlrm
basecommand.pyc90940644editdlrm
baseparser.py104650644editdlrm
baseparser.pyc113650644editdlrm
cmdoptions.py158780644editdlrm
cmdoptions.pyc155780644editdlrm
download.py317220644editdlrm
download.pyc261750644editdlrm
exceptions.py79800644editdlrm
exceptions.pyc129200644editdlrm
index.py371910644editdlrm
index.pyc350090644editdlrm
locations.py56320644editdlrm
locations.pyc49720644editdlrm
pep425tags.py113180644editdlrm
pep425tags.pyc101080644editdlrm
status_codes.py1560644editdlrm
status_codes.pyc4130644editdlrm
wheel.py320880644editdlrm
wheel.pyc268360644editdlrm
__init__.py104270644editdlrm
__init__.pyc95570644editdlrm
__main__.py5840644editdlrm
__main__.pyc5080644editdlrm
Edit: /usr/lib/python2.6/site-packages/pip-8.1.1-py2.6.egg/pip/download.pyc (26175B)
Wc3@@s[ddklZddkZddkZddkZddkZddkZddkZddk Z ddk Z ddk Z ddk Z ddk Z ddkZyddkZeZWnej o eZnXddklZddklZddkZddklZlZddklZddkl Z l!Z!l"Z"l#Z#l$Z$l%Z%l&Z&l'Z'l(Z(l)Z)ddk*l+Z+dd k,l-Z-dd k.l/Z/dd k0l1Z1dd k2l3Z3l4Z4dd k5l6Z6ddk7l8Z8ddk9l:Z:l;Z;ddk<l=Z=l>Z>ddk?l@Z@lAZAddkBlCZClDZDddkElFZFddkGlHZHddkIlJZJddkKlLZLddkMlNZNddkOlPZPdddddddd d!d"d#g ZQeiReSZTd$ZUd%e@fd&YZVd'e=fd(YZWd)eLfd*YZXd+e>fd,YZYd-e:iZfd.YZ[ddd/Z]e i^d0e i_Z`e i^d1e i_Zad2Zbd3Zcd4Zdd5Zed6Zfd7Zgd8Zhd9Zid:Zjd;Zkd<Zld=Zmdddd>Znddd?Zod@ZpdAePiqfdBYZrdedddCZsdDZtdEZudS(Fi(tabsolute_importN(tparse(trequest(tInstallationErrort HashMismatch(tPyPI( tsplitexttrmtreet format_sizet display_patht backup_dirtask_path_existst unpack_filetARCHIVE_EXTENSIONStconsumetcall_subprocess(t auto_decode(tcheck_path_owner(t indent_log(tSETUPTOOLS_SHIM(tDownloadProgressBartDownloadProgressSpinner(twrite_delete_marker_file(tvcs(trequeststsix(t BaseAdaptert HTTPAdapter(tAuthBaset HTTPBasicAuth(tCONTENT_CHUNK_SIZEtResponse(tCaseInsensitiveDict(turllib3(tCacheControlAdapter(t FileCache(t LockError(t xmlrpc_clienttget_file_contenttis_urlt url_to_patht path_to_urltis_archive_filetunpack_vcs_linktunpack_file_urlt is_vcs_urlt is_file_urltunpack_http_urlt unpack_urlcC@shhdd6tid6d6tid6htid6d6}|dddjoti|dd\stidcS@s|dS(i((R>((sD/usr/lib/python2.6/site-packages/pip-8.1.1-py2.6.egg/pip/download.pyR?`stlibtlibctdistrotdarwinisOS Xtsystemtreleasetcpuiitopenssl_versions9{data[installer][name]}/{data[installer][version]} {json}tdatatjsont separatorst,t:t sort_keys(ii(RLRM(R1t __version__tplatformtpython_versiontpython_implementationtsystpypy_version_infot releaseleveltjointstrt startswithtdicttfiltertziptlinux_distributiontlibc_vertmac_verREt setdefaultRFtmachinetHAS_TLSt version_infotssltOPENSSL_VERSIONtformatRJtdumpstTrue(RIRTt_[1]R>RCRB((sD/usr/lib/python2.6/site-packages/pip-8.1.1-py2.6.egg/pip/download.pyt user_agent=sR  6$!$&      tMultiDomainBasicAuthcB@s/eZedZdZdZdZRS(cC@s||_h|_dS(N(t promptingt passwords(tselfRk((sD/usr/lib/python2.6/site-packages/pip-8.1.1-py2.6.egg/pip/download.pyt__init__s cC@sti|i}|iiddd}ti|d |f|d|_|ii|d\}}|djo|i |i\}}n|p|o:||f|i|   +  &s^(http|https|file):s /*([a-z])\|cC@sKd|jotS|idddi}|ddddgtijS(s)Returns true if the name looks like a URLRMiiRthttpsRtftp(tFalseRRRt all_schemes(R2R((sD/usr/lib/python2.6/site-packages/pip-8.1.1-py2.6.egg/pip/download.pyR's cC@sh|idptd|ti|\}}}}}|od|}nti||}|S(s( Convert a file: URL to a path. sfile:s4You can only turn file: urls into filenames (not %r)s\\(RXtAssertionErrorRrturlsplitturllib_requestt url2pathname(Rtt_RuR((sD/usr/lib/python2.6/site-packages/pip-8.1.1-py2.6.egg/pip/download.pyR(s cC@s=tiitii|}tidti|}|S(sh Convert a path to a file: URL. The path will be made absolute and have quoted path parts. sfile:(RRtnormpathtabspathRrturljoinRt pathname2url(RRt((sD/usr/lib/python2.6/site-packages/pip-8.1.1-py2.6.egg/pip/download.pyR)scC@s,t|di}|tjotStS(s9Return True if `name` is a considered as an archive file.i(RRR RgR(R2text((sD/usr/lib/python2.6/site-packages/pip-8.1.1-py2.6.egg/pip/download.pyR*s cC@st|}|i|dS(N(t_get_used_vcs_backendtunpack(tlinktlocationt vcs_backend((sD/usr/lib/python2.6/site-packages/pip-8.1.1-py2.6.egg/pip/download.pyR+s cC@s?x8tiD]-}|i|ijo||i}|Sq WdS(N(RtbackendsRtschemesRt(RtbackendR((sD/usr/lib/python2.6/site-packages/pip-8.1.1-py2.6.egg/pip/download.pyRs  cC@stt|S(N(tboolR(R((sD/usr/lib/python2.6/site-packages/pip-8.1.1-py2.6.egg/pip/download.pyR-scC@s|iiidS(Nsfile:(RtRRX(R((sD/usr/lib/python2.6/site-packages/pip-8.1.1-py2.6.egg/pip/download.pyR.scC@st|i}tii|S(sReturn whether a file:// Link points to a directory. ``link`` must not have any other scheme but file://. Call is_file_url() first. (R(turl_without_fragmentRRtisdir(Rt link_path((sD/usr/lib/python2.6/site-packages/pip-8.1.1-py2.6.egg/pip/download.pyt is_dir_urlscO@s|S(N((titerableRR((sD/usr/lib/python2.6/site-packages/pip-8.1.1-py2.6.egg/pip/download.pyt_progress_indicatorsc @sytid}Wn"tttfj o d}nXtdt}tit i jo t}n@|o t}n/|d jo t }n|p t }nt}|i }fd}fd} t } |itijo |} n |i} |oV|o/tid| t|td |i} qtid | ti} n,|otid | ntid | tid || | |tt} |o|i| n t| dS(Nscontent-lengthit from_cachei(ic3@sxy,x%ii|dtD] }|VqWWnEtj o9x4to'ii|}|pPn|Vq@WnXdS(Ntdecode_content(RRRtAttributeErrorRgR(t chunk_sizetchunk(R(sD/usr/lib/python2.6/site-packages/pip-8.1.1-py2.6.egg/pip/download.pyt resp_read s  c3@s'x |D]}i||VqWdS(N(twrite(tchunksR(t content_file(sD/usr/lib/python2.6/site-packages/pip-8.1.1-py2.6.egg/pip/download.pytwritten_chunks2s sDownloading %s (%s)tmaxsDownloading %ssUsing cached %ssDownloading from URL %si@(tintRt ValueErrortKeyErrorRtgetattrRRtgetEffectiveLeveltloggingtINFORgtshow_urlRRuRRtinfoRRtiterRtdebugRtcheck_against_chunksR( RRR thashest total_lengtht cached_respt show_progressRR R tprogress_indicatorRttdownloaded_chunks((RR sD/usr/lib/python2.6/site-packages/pip-8.1.1-py2.6.egg/pip/download.pyt _download_urlsL       %    cC@st}tii||i}tii|otdt|d}|djo t}q|djo't i dt|ti |q|djo?t |}t i dt|t|t i||qn|o*t i||t idt|ndS( Ns/The file %s exists. (i)gnore, (w)ipe, (b)ackup titwtbs Deleting %ssBacking up %s to %ssSaved %s(R"R#R$(RgRRRVtfilenametexistsR R RRRtremoveR tshutiltmovetcopyR(R%RRR*tdownload_locationRqt dest_file((sD/usr/lib/python2.6/site-packages/pip-8.1.1-py2.6.egg/pip/download.pyt _copy_fileXs*       c C@s|djotdntidd}d}|ot|||}n|o|}ti|d}nt||||\}}t|||||o| ot |||n|pt i |nt |dS(Ns@unpack_http_url() missing 1 required keyword argument: 'session's-unpackspip-i( RyRttempfiletmkdtempt_check_download_dirRRt_download_http_urlR R-RtunlinkR( RRt download_dirRRttemp_dirtalready_downloaded_patht from_pathR((sD/usr/lib/python2.6/site-packages/pip-8.1.1-py2.6.egg/pip/download.pyR/qs,   cC@st|i}t|oTtii|ot|nti||dt |ot i dndS|o|i |nd}|ot|||}n|o |}n|}ti|d}t|||||o| ot|||ndS(sUnpack link into location. If download_dir is provided and link points to a file, make a copy of the link file inside download_dir. tsymlinkss*Link is a directory, ignoring download_dirNi(R(RRRRRRR(tcopytreeRgRRtcheck_against_pathRyR0RRR R-(RRR3RRR5R6R((sD/usr/lib/python2.6/site-packages/pip-8.1.1-py2.6.egg/pip/download.pyR,s,   c C@stii|ot|nd}tig}|id|it||id|d|g7}ti d|t i i zt |d|dtWdQXtii|ti|d }ti d ||t||d dd ddS( sCopy 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 ssetup.pys-ctsdists --dist-dirsRunning setup.py sdist for %stcwdt show_stdoutNisUnpacking sdist %s into %sRR(RRRRRSt executableRRRRRRRRRRVtlistdirR Ry(RRtsetup_pyt sdist_argsR:((sD/usr/lib/python2.6/site-packages/pip-8.1.1-py2.6.egg/pip/download.pyt_copy_dist_from_dirs   "tPipXmlrpcTransportcB@s&eZdZedZedZRS(sRProvide a `xmlrpclib.Transport` implementation via a `PipSession` object. cC@s;tii||ti|}|i|_||_dS(N(R%t TransportRnRrRsRt_schemet_session(Rmt index_urlRt use_datetimet index_parts((sD/usr/lib/python2.6/site-packages/pip-8.1.1-py2.6.egg/pip/download.pyRns c C@s|i||dddf}ti|}yXhdd6}|ii|d|d|dt}|i||_|i |i SWn4t i j o%} t id| ii|nXdS(Nstext/xmls Content-TypeRIRRsHTTP error %s while getting %s(RDRyRrRwREtpostRgRtverbosetparse_responseRRt HTTPErrorRtcriticalRqR( RmRthandlert request_bodyRJtpartsRtRRqR((sD/usr/lib/python2.6/site-packages/pip-8.1.1-py2.6.egg/pip/download.pyRs   (RRRRRnR(((sD/usr/lib/python2.6/site-packages/pip-8.1.1-py2.6.egg/pip/download.pyRBs cC@st|ot||n[t|ot|||d|n4|djo t}nt||||d||ot|ndS(svUnpack 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. RN(R-R+R.R,RyRR/R(RRR3t only_downloadRR((sD/usr/lib/python2.6/site-packages/pip-8.1.1-py2.6.egg/pip/download.pyR0s    c C@s|iiddd}y0|i|dhdd6dt}|iWn4tij o%}tid|i i |nX|i id d }|i }|i id } | o/t i| \} } | id p|}nt|d} | p(ti|} | o|| 7}q%n| oE|i|ijo2tii|id} | o|| 7}qrntii||} t| d ii}z |~}t||||WdQX| |fS(s6Download link url into temp_dir using provided sessiont#iiRtidentitysAccept-EncodingRsHTTP error %s while getting %ss content-typeRpscontent-dispositionR%twbN(RtRRxRgRRRLRRMRqRRR%tcgit parse_headerRRtguess_extensionRRRVRRRR!(RRR4Rt target_urlRRRR%tcontent_dispositionttypetparamsRt file_pathRhR ((sD/usr/lib/python2.6/site-packages/pip-8.1.1-py2.6.egg/pip/download.pyR10s<   &cC@stii||i}tii|oetid||oIy|i|Wqtj o%ti d|ti |dSXn|SdS(s Check download_dir for previously downloaded file with correct hash If a correct file is found return its path else None sFile was already downloaded %ss;Previously-downloaded file %s has bad hash. Re-downloading.N( RRRVR%R&RRR9RRR2Ry(RR3Rt download_path((sD/usr/lib/python2.6/site-packages/pip-8.1.1-py2.6.egg/pip/download.pyR0ks  (vt __future__RRUt email.utilsRRRJRRRRPtreR(RSR.RcRgRat ImportErrorRtpip._vendor.six.moves.urllibRRrRRR1tpip.exceptionsRRt pip.modelsRt pip.utilsRRRR R R R R RRtpip.utils.encodingRtpip.utils.filesystemRtpip.utils.loggingRtpip.utils.setuptools_buildRt pip.utils.uiRRt pip.locationsRtpip.vcsRt pip._vendorRRtpip._vendor.requests.adaptersRRtpip._vendor.requests.authRRtpip._vendor.requests.modelsRRtpip._vendor.requests.structuresR tpip._vendor.requests.packagesR!tpip._vendor.cachecontrolR"tpip._vendor.cachecontrol.cachesR#tpip._vendor.lockfileR$tpip._vendor.six.movesR%t__all__t getLoggerRRRiRjRRRtSessionRRyR&tcompiletIRRR'R(R)R*R+RR-R.RRR!R-R/R,RARCRBR0R1R0(((sD/usr/lib/python2.6/site-packages/pip-8.1.1-py2.6.egg/pip/download.pyts                F    AM!BH)         ` &0 $' ;