Files
PowerToys/PythonHome/Lib/site-packages/pip/commands/zip.pyc

66 lines
12 KiB
Plaintext
Raw Normal View History

2014-07-09 18:15:23 +08:00
<03>
<00>Sc@s<>ddlZddlZddlZddlZddlZddlZddlmZmZm Z ddl
m Z ddl m Z ddlmZdefd<00><00>YZdS(i<><69><EFBFBD><EFBFBD>N(t display_patht
backup_dirtrmtree(tlogger(tInstallationError(tCommandt
ZipCommandcBs<>eZdZdZdZdZd<00>Zd<00>Zd<00>Zd<00>Z d<00>Z
d <00>Z d
<00>Z d <00>Z d <00>Zd <00>Zd<00>ZRS(sZip individual packages.tzips#
%prog [options] <package> ...s$DEPRECATED. Zip individual packages.c
Os9tt|<00>j||<00>|jdkrM|jjddddddd<00>n(|jjd dd
ddd tdd <00>|jjd dddddd<00>|jjdddddddd<00>|jjddddddd<00>|jjddddddd<00>|jjdddddd<00>|jjd|j<00>dS(NRs--unziptactiont
store_truetdesttunzipthelps"Unzip (rather than zip) a package.s--zipt store_falsetdefaults"Zip (rather than unzip) a package.s--no-pyctno_pycsEDo not include .pyc files in zip files (useful on Google App Engine).s-ls--listtlists2List the packages available, and their zip status.s --sort-filest
sort_filessDWith --list, sort packages according to how many files they contain.s--pathtappendtpathss?Restrict operations to the given paths (may include wildcards).s-ns
--simulates0Do not actually perform the zip/unzip operation.i( tsuperRt__init__tnametcmd_optst
add_optiontTruetparsertinsert_option_group(tselftargstkw((sGc:\Users\lifqian\Desktop\Python27\lib\site-packages\pip\commands\zip.pyRsL 
        cCsp|jstjSg}t<00>}x<>tjD]<5D>}tjjtjj|<00><00>}x<>|jD]<5D>}tjjtjj|<00><00>}d|kr<>tjt j
|d<17>|<00>r<>|j |<00>|j |<00>Pq<50>qW|j |<00>rW|j |<00>|j |<00>PqWqWWtjd|dj|j<00>f<16>q)WxJ|jD]?}||kr)d|kr)|j |<00>tjd|<16>q)q)W|S(s:All the entries of sys.path, possibly restricted by --patht*s,Skipping path %s because it doesn't match %ss, sDAdding path %s because it doesn't match anything already on sys.path(t select_pathstsystpathtsettostnormcasetabspathtretsearchtfnmatcht translateRtaddt
startswithRtdebugtjoin(Rtresultt match_anyR"tmatch((sGc:\Users\lifqian\Desktop\Python27\lib\site-packages\pip\commands\zip.pyR>s2          cCsVtjdd<00>|j|_|j|_|jrA|j||<00>S|sVtd<00><00>ng}x<>|D]<5D>}|j|<00>\}}|jr<>t j
j |<00>r<>td||f<16><00>n6|j r<>t j
j |<00> r<>td||f<16><00>n|j ||f<00>qcWd}xJ|D]B\}}|jr6|j||<00>}q |j|||j<00>}q W|S(Ns1.7s_DEPRECATION: 'pip zip' and 'pip unzip` are deprecated, and will be removed in a future release.s2You must give at least one package to zip or unzips;The module %s (in %s) is not a zip file; cannot be unzippeds:The module %s (in %s) is not a directory; cannot be zipped(Rt
deprecatedRR tsimulateRRt find_packageR R$R"tisdirRtNonet unzip_packaget zip_packageR(RtoptionsRtpackagestargt module_nametfilenamet last_status((sGc:\Users\lifqian\Desktop\Python27\lib\site-packages\pip\commands\zip.pytrun\s4      c Cs<>tjj|<00>}tjj|<00> rPtj|<00>rPtd|||f<16><00>ntjj|<00>}||j<00>kr<>tj dt
|<00>t
|<00>t
|<00>f<16>ntj d|t
|<00>f<16>|j r<>tj d<00>dStj d7_ z<>tj|<00>}g}x|j<00>D] }|j}|j|tjj<17>r<>|j|<00>} tjj||<00>}
tjjtjj|
<00><00>s<>tjtjj|
<00><00>n| r<>|
jtjj<00>r<>tjj|
<00>s<>tj|
<00>q<>qt|
d<00>} | j| <00>| j<00>q|j||j|<00>f<00>qW|j<00>|sbtjdt
|<00><16>tj|<00>|j|<00>n`tjd|t
|<00>f<16>tj|d <00>}x$|D]\}} |j|| <00>q<>W|j<00>Wdtj d8_ XdS(
Ns3Module %s (in %s) isn't located in a zip file in %ss/Unpacking %s into %s, but %s is not on sys.pathsUnzipping %s (in %s)s3Skipping remaining operations because of --simulateitwbsRemoving now-empty zip file %ss(Removing entries in %s/ from zip file %stw( R$R"tdirnametisfiletzipfilet
is_zipfileRRRtwarnRtnotifyR3tindenttZipFiletinfolistR=R,tseptreadR.texiststmakedirstendswithtopentwritetcloseRtinfotunlinktremove_filename_from_pthtwritestr( RR<R=t zip_filenamet package_pathRtto_saveRSRtcontentR
tf((sGc:\Users\lifqian\Desktop\Python27\lib\site-packages\pip\commands\zip.pyR7{sX"      
 cCsb|}tjd|t|<00>f<16>tjd7_|jd<00>rJ|}n
|d}z<>||kr<>t|<00>}tjd||f<16>|js<>tj||<00>q<>ny<>tj dt|<00><16>|jst
j |d<00>}|j |dd <00>xt j|<00>D]<5D>\}}} |rDg| D]!}
|
j<00>jd
<00>s|
^q} nx<>|tf| tfgD]<5D>\} } x<>| D]y} t jj|| <00>}t jj||t|<00>jt jj<00>| <00>}| r<>|j |dd <00>qp|j||<00>qpWq]Wq<57>W|j<00>ntj d t|<00><16>|js/t|<00>nWn
<01>nX|j|<00>Wdtjd8_XdS( NsZip %s (in %s)is.eggs.zipsMoving %s aside to %ssCreating zip file in %sRAt/ts.pycsRemoving old directory %s(RRGRRHRORR3tshutiltmoveRSRDRIRVR$twalktlowerRtFalseR"R.tlentlstripRKRQRRRtadd_filename_to_pth(RR<R=Rt orig_filenamet dest_filenameRtdirpathtdirnamest filenamesR[tfnstis_dirtfntfullR
((sGc:\Users\lifqian\Desktop\Python27\lib\site-packages\pip\commands\zip.pyR8<00>sH 
     $% 1  cCs9x|j<00>D] }t|d<00>}|j<00>}|j<00>g|D]}|j<00>|kr?|^q?}||kr tjdt|<00>t|<00>f<16>g|D]}|r<>|^q<>s<>tjdt|<00><16>|jst j
|<00>qn2|jst|d<00>}|j |<00>|j<00>ndSq Wtj dt|<00><16>dS(Ntrs*Removing reference to %s from .pth file %ss %s file would be empty: deletingR@s.Cannot find a reference to %s in any .pth file( t pth_filesRPt readlinesRRtstripRRSRR3R$RTt
writelinesRF(RR=tpthR[tlinestlt new_linestline((sGc:\Users\lifqian\Desktop\Python27\lib\site-packages\pip\commands\zip.pyRU<00>s$ 
+      cCstjj|<00>}|d}||j<00>krHtjdt|<00><16>n|js<>tjj|<00>r<>t |<00>}|j
<00>}|j <00>|r<>|dj d<00> r<>|dcd7<n|j |d<17>n |dg}t |d<00>}|j|<00>|j <00>ndS(Ns.pths.Adding .pth file %s, but it is not on sys.pathi<68><69><EFBFBD><EFBFBD>s
R@(R$R"RBRRRFRR3RMRPRqRRRORRs(RR=R"R
R[Ru((sGc:\Users\lifqian\Desktop\Python27\lib\site-packages\pip\commands\zip.pyRe<00>s 
   
  ccs<>x<>|j<00>D]r}tjj|<00> s tjj|<00> r?q nx=tj|<00>D],}|jd<00>rOtjj||<00>VqOqOWq WdS(Ns.pth(RR$R"RMR5tlistdirROR.(RR"R=((sGc:\Users\lifqian\Desktop\Python27\lib\site-packages\pip\commands\zip.pyRps &cCs<>x<>|j<00>D]<5D>}tjj||<00>}tjj|<00>rD||fStjj|<00> r tj|<00>r tj|d<00>}y |j tjj|d<00><00>Wnt
k
r<>nX|j <00>||fS|j <00>q q Wt d|<16><00>dS(NRos __init__.pys!No package with the name %s found( RR$R"R.RMR5RDRERIRLtKeyErrorRRR(RtpackageR"RnR((sGc:\Users\lifqian\Desktop\Python27\lib\site-packages\pip\commands\zip.pyR4 s
"  

c CsA|rtd<00><00>nx%t|j<00><00>D]}tjj|<00>sFq(ntjj|jtjj<00><00>}tjj |<00>r<>t
j |<00>r<>tjj |<00>|j<00>kr(t jdt|<00><16>q(q(n|dkr|dkr|jdd<00>jd<00> rq(nt jdt|<00><16>t jd 7_g}g}z<>x<>ttj|<00><00>D]<5D>}tjj|<00>d
j<00>}|dkrqKn|dkr<>t jdt|<00><16>qKntjj||<00>} tjj| <00>r<>|j||j| <00>f<00>qKt
j | <00>r |j|<00>qKt jdt|<00><16>qKW|r<>t jd<00>t jd 7_z"x|D]}t j|<00>qTWWdt jd 8_Xn t jd<00>|r|jr<>|jdd<00><00>nt jd<00>t jd 7_z2x+|D]#\}}
t jd||
f<16>q<>WWdt jd 8_Xn t jd<00>Wdt jd 8_Xq(WdS(Ns'You cannot give an argument with --listsZipped egg: %ss site-packagess dist-packagess\R\s
lib/pythonsIn %s:iis.pths .egg-infos .egg-links.pys Not displaying %s: not a packagesUnknown file: %ssZipped packages:sNo zipped packages.tkeycSs |d S(Ni((tx((sGc:\Users\lifqian\Desktop\Python27\lib\site-packages\pip\commands\zip.pyt<lambda>LssUnzipped packages:s%s (%i files)sNo unzipped packages.(s.pths .egg-infos .egg-link(RtsortedRR$R"RMtbasenametrstripRKRCRDRERBRRGRtreplaceRORHRytsplitextRaRSR.R5Rt count_packageRtsort( RR9RR"R<>tzippedtunzippedR=textRntcount((sGc:\Users\lifqian\Desktop\Python27\lib\site-packages\pip\commands\zip.pyRsf !!       cCskd}x^tj|<00>D]M\}}}g|D]!}|j<00>jd<00>s,|^q,}|t|<00>7}qW|S(Nis.pyc(R$R`RaRORc(RR"ttotalRhRiRjR[((sGc:\Users\lifqian\Desktop\Python27\lib\site-packages\pip\commands\zip.pyR<79>Ys  !(t__name__t
__module__t__doc__RtusagetsummaryRRR?R7R8RUReRpR4RR<>(((sGc:\Users\lifqian\Desktop\Python27\lib\site-packages\pip\commands\zip.pyR s *   3 ,     ;(R!R'R)R$R^RDtpip.utilRRRtpip.logRtpip.exceptionsRtpip.basecommandRR(((sGc:\Users\lifqian\Desktop\Python27\lib\site-packages\pip\commands\zip.pyt<module>s