abc@@siddlmZddlZddlZddlZddlZddlZddlZddlZddl m Z ej dde yddl Z Wne k rncXejdkr ee dddkr ydd lmZWne efk rq Xejndd lmZmZmZdd lmZmZdd lmZmZdd lmZmZm Z m!Z!ddl"m#Z#m$Z$ddl%m&Z&m'Z'ddl%m(Z(ddl m)Z)ddl*Z+e+j,Z,dZ-ej.e/Z0ej dde)dZ1dZ2dZ3dZ4ddZ6de7fdYZ8e/dkreej9e6ndS(i(tabsolute_importN(tDependencyWarningtignoretcategorytdarwintOPENSSL_VERSION_NUMBERi(tsecuretransport(tInstallationErrort CommandErrortPipError(tget_installed_distributionstget_prog(t deprecationtdist_is_editable(tgitt mercurialt subversiontbazaar(tConfigOptionParsertUpdatingDefaultsHelpFormatter(t get_summariestget_similar_commands(t commands_dict(tInsecureRequestWarnings9.0.3cC@sdtjkrdStjdjd}ttjd}y||d}Wntk rhd}nXgtD]\}}|^qs}g}y-g|D]}||kr|^qd}Wntk rd}nXt} |r|dkrtj dn|d kr|j d  rg} |j } xOt d t D]>} | jj | rA| j|dkrA| j| jqAqAW| rx| D] } | GHqWtj dqnt|} |g| jjD]-}|jtjkr|j|jf^q7}g|d|d!D]}|jd d^q}g|D]$\}}||kr;||f^q;}g|D]'\}}|j |rl||f^ql}x|D],}|d}|dr|d 7}n|GHqWn|j d s|j d rhg| jD]}|j^q}|j| jd|D}|g|D]$}|jtjkr:|j^q:7}ndjg|D]}|j |ru|^quGHtj ddS(sCommand and option completion for the main option parser (and options) and its subcommands (and options). Enable by sourcing one of the completion shell scripts (bash, zsh or fish). tPIP_AUTO_COMPLETENt COMP_WORDSit COMP_CWORDtithelpt uninstallt-t local_onlyt=s--cs@s"|]}|D] }|Vq qdS(N((t.0titto((s0/usr/lib/python2.7/site-packages/pip/__init__.pys st (tostenvirontsplittintt IndexErrorRtNonetcreate_main_parsertsystexitt startswithtlowerR tTruetkeytappendRtparsertoption_list_allRtoptparset SUPPRESS_HELPtget_opt_stringtnargst option_groupst option_listtjoin(tcwordstcwordtcurrenttcmdtsummaryt subcommandstoptionstwtsubcommand_nameR3t installedtlctdistt subcommandtopttxt prev_optstvtktoptiont opt_labeltitopts((s0/usr/lib/python2.7/site-packages/pip/__init__.pyt autocompleteEs`  "-     %   .114     (0cC@sidd6td6td6dd6td6}t|}|jtjjtjjtjjt }dt |t j d f|_ t jt j|}|j|t|_t}d gg|D]\}}d ||f^q}d j||_|S( Ns %prog [options]tusagetadd_help_optiont formattertglobaltnametprogspip %s from %s (python %s)iRs%-27s %ss (tFalseRR Rtdisable_interspersed_argsR%tpathtdirnametabspatht__file__t __version__R,tversiont cmdoptionstmake_option_groupt general_grouptadd_option_groupR0tmainRR;t description(t parser_kwR3t pip_pkg_dirtgen_optstcommand_summariesRPtjRf((s0/usr/lib/python2.7/site-packages/pip/__init__.pyR+s$    *   0cC@st}|j|\}}|jrZtjj|jtjjtjtjn| s|ddkrt |dkr|j tjn|d}|t krt |}d|g}|r|j d|ntdj|n|}|j|||fS(NiRisunknown command "%s"smaybe you meant "%s"s - (R+t parse_argsR`R,tstdouttwriteR%tlinesepR-tlent print_helpRRR2RR;tremove(targsR3tgeneral_optionst args_elsetcmd_nametguesstmsgtcmd_args((s0/usr/lib/python2.7/site-packages/pip/__init__.pyt parseoptss&   )       cC@st}d|krt}n|S(Ns --isolated(RYR0(Rstisolated((s0/usr/lib/python2.7/site-packages/pip/__init__.pytcheck_isolateds  cC@s|dkrtjd}ntjtyt|\}}WnGtk r}tjj d|tjj t j tj dnXyt jt jdWn&t jk r}tjd|nXt|dt|}|j|S(Nis ERROR: %sRs%Ignoring error %s when setting localeR{(R*R,targvR tinstall_warning_loggerRRRzR tstderrRnR%RoR-tlocalet setlocaletLC_ALLtErrortloggertdebugRR|Re(RsRvRytexctetcommand((s0/usr/lib/python2.7/site-packages/pip/__init__.pyRes   tFrozenRequirementcB@sYeZddZejdZejdZedZe dZ dZ RS(cC@s(||_||_||_||_dS(N(RWtreqteditabletcomments(tselfRWRRR((s0/usr/lib/python2.7/site-packages/pip/__init__.pyt__init__s   s-r(\d+)$s-(20\d\d\d\d\d\d)$cC@stjjtjj|j}g}ddlm}m}t|r|j |rt }y|||}Wn)t k r} t j d| d}nX|dkrt j d||jd|j}t}qn t}|j}|j} | dd} |jj| } |jj| } | s7| r|jd}|rd|j||}n|st j d||jd q|jd || r| jd}nd | jd}t }d |||j|f}n||j|||S( Ni(tvcstget_src_requirementsYError when trying to get requirement for VCS system %s, falling back to uneditable formats-Could not determine repository location of %ss-## !! Could not determine repository locationitsvns(Warning: cannot find svn location for %ssF## FIXME: could not find svn URL in dependency_links for this package:s3# Installing as editable to satisfy requirement %s:s{%s}s %s@%s#egg=%s(R%R[tnormcaseR]tlocationtpip.vcsRRR tget_backend_nameR0RRtwarningR*R2tas_requirementRYtspecst_rev_retsearcht_date_ret get_backendt get_locationtgrouptegg_namet project_name(tclsRGtdependency_linksRRRRRRRRR`t ver_matcht date_matcht svn_backendt svn_locationtrev((s0/usr/lib/python2.7/site-packages/pip/__init__.pyt from_dists`!            cC@s;|j}tjd|}|r7||j }n|S(Ns -py\d\.\d$(RtreRtstart(RGRWtmatch((s0/usr/lib/python2.7/site-packages/pip/__init__.pyRIs  cC@sF|j}|jrd|}ndjt|jt|gdS(Ns-e %ss (RRR;tlistRtstr(RR((s0/usr/lib/python2.7/site-packages/pip/__init__.pyt__str__Qs   (( t__name__t __module__RRtcompileRRt classmethodRt staticmethodRR(((s0/usr/lib/python2.7/site-packages/pip/__init__.pyRs  At__main__(:t __future__RRtloggingR%R5twarningsR,Rtpip._vendor.urllib3.exceptionsRtfilterwarningstsslt ImportErrortplatformtgetattrtpip._vendor.urllib3.contribRtOSErrortinject_into_urllib3tpip.exceptionsRRR t pip.utilsR R R R RRRRRtpip.baseparserRRt pip.commandsRRRRtpip.cmdoptionstpipRaR_t getLoggerRRRRR+RzR|R*RetobjectRR-(((s0/usr/lib/python2.7/site-packages/pip/__init__.pytsR         "   I  * [