ok

Mini Shell

Direktori : /opt/alt/python33/lib/python3.3/site-packages/pip/
Upload File :
Current File : //opt/alt/python33/lib/python3.3/site-packages/pip/basecommand.pyo

�
�2{Yc@sOdZddlZddlZddlZddlZddlZddlZddlmZddl	m
Z
ddlmZddl
mZddlmZmZmZmZmZddlmZdd	lmZmZdd
lmZmZmZmZmZddl m!Z!dgZ"de#fd
��YZ$dd�Z&dd�Z'dS(s(Base Command class, and related routinesi����N(t
cmdoptions(trunning_under_virtualenv(tlogger(t
PipSession(t
BadCommandtInstallationErrortUninstallationErrortCommandErrortPreviousBuildDirError(tStringIO(tConfigOptionParsertUpdatingDefaultsHelpFormatter(tSUCCESStERRORt
UNKNOWN_ERRORtVIRTUALENV_NOT_FOUNDtPREVIOUS_BUILD_DIR_ERROR(tget_progtCommandcBsGeZdZdZeZd�Zd�Zd�Z	d�Z
d�ZRS(cCs�i|jd6dt�|jfd6t�d6td6|jd6|jd6}t|�|_d|jj�}t	j
|j|�|_tj
tj|j�}|jj|�dS(	Ntusages%s %stprogt	formattertadd_help_optiontnametdescriptions
%s Options(RRRRtFalset__doc__R
tparsert
capitalizetoptparsetOptionGrouptcmd_optsRtmake_option_groupt
general_grouptadd_option_group(tselft	parser_kwt
optgroup_nametgen_opts((s@/opt/alt/python33/lib/python3.3/site-packages/pip/basecommand.pyt__init__s



cCsvt�}|jr!|j|_n|jr9|j|_n|jrbi|jd6|jd6|_n|j|j_|S(Nthttpthttps(	Rtcerttverifyttimeouttproxytproxiestno_inputtautht	prompting(R#toptionstsession((s@/opt/alt/python33/lib/python3.3/site-packages/pip/basecommand.pyt_build_session3s				
cCsdS(N((R#((s@/opt/alt/python33/lib/python3.3/site-packages/pip/basecommand.pyt
setup_loggingJscCs|jj|�S(N(Rt
parse_args(R#targs((s@/opt/alt/python33/lib/python3.3/site-packages/pip/basecommand.pyR6MscCs�|j|�\}}d}||j7}||j8}tjd|�}g}tj|tjftj|j	f�|j
r�tt_n|j
�|jr�dtjd<n|jr�dj|j�tjd<n|jrt�stjd�tjt�qn|jr6t|jd�}tjtj|f�nd}t}t}y.|j||�}t|t�ru|}nWn�t k
r�tj!�d}	tjt"|	��tj#d	t$��t}t%}n[t&t'fk
r%tj!�d}	tjt"|	��tj#d	t$��t}t(}nt)k
rxtj!�d}	tjt"|	��tj#d	t$��t}t(}n�t*k
r�tj!�d}	tjd
|	�tj#d	t$��t(}ndt+k
rtjd�tj#d	t$��t}t(}n'tjdt$��t}t,}nX|r�|j-}
d
j|�}yt|
d�}Wn;t.k
r�t/j0dt�}
|
j1}
t|
d�}nXtjd|
�|j2|�|j3�n|dk	r�|j3�n|S(Niit1tPIP_NO_INPUTt tPIP_EXISTS_ACTIONs2Could not find an activated virtualenv (required).tasException information:
%ss	ERROR: %ssOperation cancelled by users
Exception:
%ss
twtdeletes#Storing debug log for failure in %s(4R6tverbosetquietRtlevel_for_integert
add_consumerstsyststdouttDEBUGtappendtlog_explicit_levelstTruetexplicit_levelsR5R/tostenviront
exists_actiontjointrequire_venvRtfataltexitRtlogtopen_logfiletNoneRRtrunt
isinstancetintRtexc_infotstrtinfot
format_excRRRR
RRtKeyboardInterruptRtlog_filetIOErrorttempfiletNamedTemporaryFileRtwritetclose(R#R7R2tleveltcomplete_logtlog_fpRPt	store_logtstatustetlog_file_fnttexttlog_file_fpttemp((s@/opt/alt/python33/lib/python3.3/site-packages/pip/basecommand.pytmainQs�

	
				
	

		
	
	

	
	
	


N(t__name__t
__module__RSRRRthiddenR'R4R5R6Rl(((s@/opt/alt/python33/lib/python3.3/site-packages/pip/basecommand.pyRs				cCsG|dkrtj�}nt�}tj|td|��|j�S(Ntfile(RSRCRWR	t	tracebacktprint_exceptiontdicttgetvalue(RWtout((s@/opt/alt/python33/lib/python3.3/site-packages/pip/basecommand.pyRZ�s
	R<cCs�tjj|�}tjj|�}tjj|�}tjj|�sXtj|�ntjj|�}t||�}|r�|jddd�|jdt	j
dtjd�f�n|S(s�Open the named log file in append mode.

    If the file already exists, a separator will also be printed to
    the file to separate past activity from current activity.
    s%s
t-i<s
%s run on %s
is%c(
RJtpatht
expandusertabspathtdirnametexiststmakedirstopenR`RCtargvttimetstrftime(tfilenametmodeRzR{Rd((s@/opt/alt/python33/lib/python3.3/site-packages/pip/basecommand.pyRR�s*((RRJRCR^RqRRtpipRt
pip.locationsRtpip.logRtpip.downloadRtpip.exceptionsRRRRRtpip.backwardcompatR	tpip.baseparserR
Rtpip.status_codesRR
RRRtpip.utilRt__all__tobjectRRSRZRR(((s@/opt/alt/python33/lib/python3.3/site-packages/pip/basecommand.pyt<module>s&((	�

Zerion Mini Shell 1.0