Hacked By AnonymousFox

Current Path : /opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/
Upload File :
Current File : //opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/scripts.pyc

�
�Rec@s�ddlmZddlZddlZddlZddlZddlZddlmZm	Z	m
Z
ddlmZddl
mZmZmZmZmZeje�Zdj�Zejd�Zd	Zd
�ZeZdefd��YZdS(
i����(tBytesIONi(t	sysconfigtdetect_encodingtZipFile(tfinder(tFileOperatortget_export_entrytconvert_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 -*-
import re
import sys
from %(module)s import %(import_name)s
if __name__ == '__main__':
    sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
    sys.exit(%(func)s())
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�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/scripts.pytenquote_executable3stScriptMakercBseZdZeZdZeedd�Z	d�Z
ejj
d�rZd�Zd�Znd�Zddd�Zd	�ZeZd
�Zd�Zdd�Zd
�Zed��Zejd��Zejdks�ejdkrejdkrd�Zndd�Z dd�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|_tj|_dS(NtposixtjavatsX.Ytnt(RsX.Y(t
source_dirt
target_dirt
add_launcherstFalsetforcetclobbertostnamet_nametset_modetsettvariantsRt_fileopt_is_nttsystversion_info(tselfRRRtdry_runtfileop((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/scripts.pyt__init__Ns					!cCsa|jdt�r]|jr]tjj|�\}}|jdd�}tjj||�}n|S(Ntguitpythontpythonw(tgetRR$RtpathR
treplacetjoin(R'Rtoptionstdntfn((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/scripts.pyt_get_alternate_executable_s
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�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/scripts.pyt	_is_shellgscCs^|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�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/scripts.pyt_fix_jython_executablesscCs�tjdkrt}nPt|�t|�d}tjdkrJd}nd}d|koe||k}|r�d||d}n&d	}|d
||d7}|d7}|S(
s
        Build a shebang line. In the simple case (on Windows, or a shebang line
        which is not too long or contains spaces) use a simple formulation for
        the shebang. Otherwise, use /bin/sh as the executable, with a contrived
        shebang which allows the script to run either under Python or sh, using
        suitable quoting. Thanks to Harald Nordgren for his input.

        See also: http://www.in-ulm.de/~mascheck/various/shebang/#length
                  https://hg.mozilla.org/mozilla-central/file/tip/mach
        RitdarwiniiR
s#!s
s
#!/bin/sh
s	'''exec' s "$0" "$@"
s' '''(RRtTruetlenR%tplatform(R'Rtpost_interptsimple_shebangtshebang_lengthtmax_shebang_lengthtresult((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/scripts.pyt_build_shebangs		
RcCs�t}|jr!|j}t}n�tj�s9t�}nqt�rptjj	tj
d�dtjd��}n:tjj	tjd�dtjd�tjd�f�}|r�|j||�}nt
jjd�r�|j|�}n|r�t|�}n|jd�}t
jd	krAd
|krAd|krA|d7}n|j||�}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,The shebang (%r) is not decodable from utf-8s?The shebang (%r) is not decodable from the script encoding (%r)(RFRRRtis_python_buildRR	RR/R1tget_pathtget_config_varR5R%RHRRDRtencodeRNtdecodetUnicodeDecodeErrort
ValueError(R'tencodingRIR2tenquoteRtshebang((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/scripts.pyt_get_shebang�sJ					



cCs6|jtd|jd|jjd�dd|j�S(Ntmoduletimport_namet.itfunc(tscript_templatetdicttprefixtsuffixR
(R'tentry((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/scripts.pyt_get_script_text�scCstjj|�}|j|S(N(RR/tbasenametmanifest(R'texenametbase((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/scripts.pytget_manifest�scCs�|jo|j}tjjd�}|j|�s@||7}n|sS||}nx|dkrq|jd�}n|jd�}t�}	t|	d��}
|
j	d|�WdQX|	j
�}|||}x�|D]�}tjj|j
|�}
|r�tjj|
�\}}|jd�r&|}
nd|
}
y|jj|
|�Wq�tk
r�tjd�d	|
}tjj|�r�tj|�ntj|
|�|jj|
|�tjd
�ytj|�Wq�tk
r�q�Xq�Xn�|jr|
jd|�rd|
|f}
ntjj|
�rN|jrNtjd
|
�q�n|jj|
|�|jr�|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 logicRas%s.%ssSkipping existing file %s(RR$RtlinesepRWRCt
_get_launcherRRtwritestrtgetvalueR/R1RtsplitextRR#twrite_binary_filet	ExceptionR:R;texiststremovetrenametdebugRR tset_executable_modetappend(R'tnamesR]tscript_bytest	filenamestexttuse_launcherRqtlaunchertstreamtzftzip_dataRtoutnametntetdfname((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/scripts.pyt
_write_script�sX

	
	





	cCs[d}|rL|jdg�}|rLddj|�}|jd�}qLn|jd|d|�}|j|�jd�}|j}t�}	d|jkr�|	j|�nd|jkr�|	jd||j	d	f�nd
|jkr|	jd||j	d	|j	df�n|r8|jd
t
�r8d}
nd}
|j|	||||
�dS(NRtinterpreter_argss %sR
sutf-8R2tXs%s%sisX.Ys%s-%s.%siR+tpywRn(R.R1RWR^RhRR!R"taddR&RR�(R'RgR�R2RItargsR]tscriptRtscriptnamesR�((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/scripts.pyt_make_scripts*		!	cCs@t}tjj|jt|��}tjj|jtjj|��}|jr||j	j
||�r|tjd|�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�Rn($RRR/R1RRRRiRR#tnewerR:R{R6R9R(tNonetreadlineR;tget_command_namet
FIRST_LINE_REtmatchR0RFtgrouptcloset	copy_fileR R|R}tinfoRtseekR^R�R7(R'R�R�tadjustR�tft
first_lineR�RIR[tlinesR]R�R�((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/scripts.pyt_copy_script5sR$ 
	
	
	

	%cCs
|jjS(N(R#R((R'((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/scripts.pyR(iscCs||j_dS(N(R#R((R'tvalue((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/scripts.pyR(msRcCs�tjd�dkrd}nd}d||f}tjdd�d}t|�j|�}|s�d	||f}t|��n|jS(
NtPit64t32s%s%s.exeRaiis(Unable to find resource %s in package %s(tstructtcalcsizet__name__trsplitRtfindRZtbytes(R'tkindtbitsRtdistlib_packagetresourcetmsg((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/scripts.pyRrus	
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.
        R2N(RR�R�R�(R't
specificationR2R�Rg((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/scripts.pytmake�scCs4g}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'tspecificationsR2R�R�((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/scripts.pyt
make_multiple�s
N("R�t
__module__t__doc__tSCRIPT_TEMPLATERcR�RRFRR*R5R%RHRR=RDRNR^Rht_DEFAULT_MANIFESTRjRmR�R�R�tpropertyR(tsetterRRRRrR�R�(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/scripts.pyREs.			@			4	4-(tioRtloggingRtreR�R%tcompatRRRt	resourcesRtutilRRRRR	t	getLoggerR�R:tstripR�tcompileR�R�Rt_enquote_executabletobjectR(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/distlib/scripts.pyt<module>s(	

Hacked By AnonymousFox1.0, Coded By AnonymousFox