Your IP : 3.147.103.159
�
��abc@s�ddlmZddlZddlZddlZddlZddlZddlmZm Z m
Z
ddlmZddl
mZmZmZmZmZeje�Zdj�Zejd�Zd Zd
�Zdefd��YZdS(
i����(tBytesIONi(t sysconfigtdetect_encodingtZipFile(tfinder(tFileOperatortget_export_entrytconvert_pathtget_executabletin_venvs�
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity version="1.0.0.0"
processorArchitecture="X86"
name="%s"
type="win32"/>
<!-- Identify the application security requirements. -->
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
</requestedPrivileges>
</security>
</trustInfo>
</assembly>s^#!.*pythonw?[0-9.]*([ ].*)?$s|# -*- coding: utf-8 -*-
if __name__ == '__main__':
import sys, re
def _resolve(module, func):
__import__(module)
mod = sys.modules[module]
parts = func.split('.')
result = getattr(mod, parts.pop(0))
for p in parts:
result = getattr(result, p)
return result
try:
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
func = _resolve('%(module)s', '%(func)s')
rc = func() # None interpreted as 0
except Exception as e: # only supporting Python >= 2.6
sys.stderr.write('%%s\n' %% e)
rc = 1
sys.exit(rc)
cCs�d|kr�|jd�re|jdd�\}}d|kr�|jd�r�d||f}q�q�|jd�s�d|}q�n|S(Nt s
/usr/bin/env it"s%s "%s"s"%s"(t
startswithtsplit(t
executabletenvt_executable((s?/usr/lib/python2.7/site-packages/pip/_vendor/distlib/scripts.pyt_enquote_executableBstScriptMakercBseZdZeZdZeedd�Z d�Z
ejj
d�rZd�Zd�Znddd�Zd�ZeZd �Zd
�Zdd�Zd�Zed
��Zejd��Zejdks�ejdkr�ejdkr�d�Zndd�Zdd�Z RS(s_
A class to copy or create scripts from source scripts or callable
specifications.
cCs�||_||_||_t|_t|_tjdkpWtjdkoWtjdk|_ t
d�|_|p{t|�|_
tjdkp�tjdko�tjdk|_dS(NtposixtjavatsX.Ytnt(RsX.Y(t
source_dirt
target_dirt
add_launcherstFalsetforcetclobbertostnamet_nametset_modetsettvariantsRt_fileopt_is_nt(tselfRRRtdry_runtfileop((s?/usr/lib/python2.7/site-packages/pip/_vendor/distlib/scripts.pyt__init__[s cCsa|jdt�r]|jr]tjj|�\}}|jdd�}tjj||�}n|S(Ntguitpythontpythonw(tgetRR$RtpathR
treplacetjoin(R%Rtoptionstdntfn((s?/usr/lib/python2.7/site-packages/pip/_vendor/distlib/scripts.pyt_get_alternate_executableks
RcCs[y,t|��}|jd�dkSWdQXWn(ttfk
rVtjd|�tSXdS(sl
Determine if the specified executable is a script
(contains a #! line)
is#!NsFailed to open %s(topentreadtOSErrortIOErrortloggertwarningR(R%Rtfp((s?/usr/lib/python2.7/site-packages/pip/_vendor/distlib/scripts.pyt _is_shellsscCs^|j|�r=ddl}|jjjd�dkrV|Sn|j�jd�rV|Sd|S(Ni����sos.nametLinuxs
jython.exes/usr/bin/env %s(R;RtlangtSystemtgetPropertytlowertendswith(R%RR((s?/usr/lib/python2.7/site-packages/pip/_vendor/distlib/scripts.pyt_fix_jython_executablesRcCs�t}|jr!|j}t}n�tj�s9t�}nqt�rptjj tj
d�dtjd��}n:tjj tjd�dtjd�tjd�f�}|r�|j||�}nt
jjd�r�|j|�}ntjj|�}|rt|�}n|jd�}t
jd krSd
|krSd|krS|d7}nd
||d}y|jd�Wn!tk
r�td|��nX|dkr�y|j|�Wq�tk
r�td||f��q�Xn|S(Ntscriptsspython%stEXEtBINDIRs
python%s%stVERSIONRsutf-8tclis -X:Framess
-X:FullFramess
-X:Framess#!s
s,The shebang (%r) is not decodable from utf-8s?The shebang (%r) is not decodable from the script encoding (%r)(tTrueRRRtis_python_buildRR RR-R/tget_pathtget_config_varR3tsystplatformRRBtnormcaseRtencodetdecodetUnicodeDecodeErrort
ValueError(R%tencodingtpost_interpR0tenquoteRtshebang((s?/usr/lib/python2.7/site-packages/pip/_vendor/distlib/scripts.pyt_get_shebang�sL
cCs |jtd|jd|j�S(Ntmoduletfunc(tscript_templatetdicttprefixtsuffix(R%tentry((s?/usr/lib/python2.7/site-packages/pip/_vendor/distlib/scripts.pyt_get_script_text�scCstjj|�}|j|S(N(RR-tbasenametmanifest(R%texenametbase((s?/usr/lib/python2.7/site-packages/pip/_vendor/distlib/scripts.pytget_manifest�scCs�|jo|j}tjjd�}|s;|||}n||dkrY|jd�}n|jd�}t�} t| d��}
|
jd|�WdQX| j �}||||}x�|D]�}tj
j|j|�}
|r�tj
j
|
�\}}|jd�r|}
nd|
}
y|jj|
|�Wqltk
r�tjd�d |
}tj
j|�r|tj|�ntj|
|�|jj|
|�tjd
�ytj|�Wq�tk
r�q�XqlXn�|jr|
jd|�rd|
|f}
ntj
j|
�r:|jr:tjd
|
�q�n|jj|
|�|jrl|jj|
g�n|j|
�q�WdS(Nsutf-8tpytttws__main__.pys.pys%s.exes:Failed to write executable - trying to use .deleteme logics%s.deletemes0Able to replace executable using .deleteme logict.s%s.%ssSkipping existing file %s(RR$RtlinesepROt
_get_launcherRRtwritestrtgetvalueR-R/RtsplitextRR#twrite_binary_filet ExceptionR8R9texiststremovetrenametdebugRARR tset_executable_modetappend(R%tnamesRVtscript_bytest filenamestexttuse_launcherRitlaunchertstreamtzftzip_dataRtoutnametntetdfname((s?/usr/lib/python2.7/site-packages/pip/_vendor/distlib/scripts.pyt
_write_script�sT
cCsQd}|rL|jdg�}|rLddj|�}|jd�}qLn|jd|d|�}|j|�jd�}|j}t�} d|jkr�| j|�nd|jkr�| jd|t j
d f�nd
|jkr
| jd|t j
d f�n|r.|jd
t�r.d}
nd}
|j| ||||
�dS(NRtinterpreter_argss %sR
sutf-8R0tXs%s%sisX.Ys%s-%siR)tpywRe(
R,R/RORWR_RR!R"taddRLtversionRR�(R%R^RxR0RTtargsRVtscriptRtscriptnamesRy((s?/usr/lib/python2.7/site-packages/pip/_vendor/distlib/scripts.pyt_make_script�s( !! cCs@t}tjj|jt|��}tjj|jtjj|��}|jr||j j
||�r|tjd|�dSyt
|d�}Wn&tk
r�|js��nd}noX|j�}|s�tjd|j�|�dStj|jdd��}|r&t}|jd�p d}n|s�|r?|j�n|j j||�|jrq|j j|g�n|j|�n�tjd||j�|j js)t|j�\} }
|j d �|j!| |�}d
|kr�d}nd}tjj|�}
|j"|
g||j#�||�n|r<|j�ndS(
Nsnot copying %s (up-to-date)trbs"%s: %s is an empty file (skipping)s
s
iRscopying and adjusting %s -> %siR+R�Re($RRR-R/RRRR`RR#tnewerR8RsR4R7R&tNonetreadlineR9tget_command_namet
FIRST_LINE_REtmatchR.RHtgrouptcloset copy_fileR RtRutinfoRtseekRWR�R5(R%R�RxtadjustRtft
first_lineR�RTRStlinesRVRyR�((s?/usr/lib/python2.7/site-packages/pip/_vendor/distlib/scripts.pyt_copy_scriptsR$
%cCs
|jjS(N(R#R&(R%((s?/usr/lib/python2.7/site-packages/pip/_vendor/distlib/scripts.pyR&JscCs||j_dS(N(R#R&(R%tvalue((s?/usr/lib/python2.7/site-packages/pip/_vendor/distlib/scripts.pyR&NsRcCsftjd�dkrd}nd}d||f}tjdd�d}t|�j|�j}|S( NtPit64t32s%s%s.exeRhii(tstructtcalcsizet__name__trsplitRtfindtbytes(R%tkindtbitsRtdistlib_packagetresult((s?/usr/lib/python2.7/site-packages/pip/_vendor/distlib/scripts.pyRjVs cCsKg}t|�}|dkr1|j||�n|j||d|�|S(s�
Make a script.
:param specification: The specification, which is either a valid export
entry specification (to make a script from a
callable) or a filename (to make a script by
copying from a source location).
:param options: A dictionary of options controlling script generation.
:return: A list of all absolute pathnames written to.
R0N(RR�R�R�(R%t
specificationR0RxR^((s?/usr/lib/python2.7/site-packages/pip/_vendor/distlib/scripts.pytmakedscCs4g}x'|D]}|j|j||��q
W|S(s�
Take a list of specifications and make scripts from them,
:param specifications: A list of specifications.
:return: A list of all absolute pathnames written to,
(textendR�(R%tspecificationsR0RxR�((s?/usr/lib/python2.7/site-packages/pip/_vendor/distlib/scripts.pyt
make_multiplews
N(!R�t
__module__t__doc__tSCRIPT_TEMPLATERZR�RRHRR(R3RLRMRR;RBRWR_t_DEFAULT_MANIFESTRaRdR�R�R�tpropertyR&tsetterRRRRjR�R�(((s?/usr/lib/python2.7/site-packages/pip/_vendor/distlib/scripts.pyRRs, 8 2 4-(tioRtloggingRtreR�RLtcompatRRRt resourcesRtutilRRRRR t getLoggerR�R8tstripR�tcompileR�R�RtobjectR(((s?/usr/lib/python2.7/site-packages/pip/_vendor/distlib/scripts.pyt<module>s(
?>