File "scripts.cpython-37.pyc"

Full Path: /home/attunedd/public_html/byp/izo/con7ext_sym404/rintoar.txt/opt/alt/python37/lib/python3.7/site-packages/distlib/__pycache__/scripts.cpython-37.pyc
File size: 10.81 KB
MIME-type: text/x-bytecode.python
Charset: 8 bit

B

:a8E@sddlmZddlZddlZddlZddlZddlZddlmZm	Z	m
Z
ddlmZddl
mZmZmZmZmZmZeeZdZedZd	Zd
dZeZGdd
d
eZdS))BytesION)	sysconfigdetect_encodingZipFile)finder)FileOperatorget_export_entryconvert_pathget_executableget_platformin_venva
<?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.]*([ 	].*)?$z# -*- 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())
cCsXd|krT|drB|dd\}}d|krT|dsTd||f}n|dsTd|}|S)N z
/usr/bin/env r"z%s "%s"z"%s")
startswithsplit)
executableenvZ_executabler@/opt/alt/python37/lib/python3.7/site-packages/distlib/scripts.pyenquote_executable3s

rc@seZdZdZeZdZd*ddZddZe	j
d	rBd
dZdd
Z
ddZd+ddZddZeZddZddZdZddZd,ddZddZed d!Zejd"d!Zejd#ksejd	krejd#krd$d%Zd-d&d'Z d.d(d)Z!dS)/ScriptMakerz_
    A class to copy or create scripts from source scripts or callable
    specifications.
    NTFcCs||_||_||_d|_d|_tjdkp:tjdko:tjdk|_t	d|_
|pRt||_tjdkprtjdkortjdk|_
tj|_dS)NFposixjava)zX.Ynt)
source_dir
target_dir
add_launchersforceclobberosname_nameset_modesetvariantsr_fileop_is_ntsysversion_info)selfrrrdry_runZfileoprrr__init__Ns

zScriptMaker.__init__cCs@|ddr<|jr<tj|\}}|dd}tj||}|S)NguiFpythonZpythonw)getr(r!pathrreplacejoin)r+roptionsZdnfnrrr_get_alternate_executable_s
z%ScriptMaker._get_alternate_executablerc	CsLy"t|}|ddkSQRXWn$ttfk
rFtd|dSXdS)zl
            Determine if the specified executable is a script
            (contains a #! line)
            z#!NzFailed to open %sF)openreadOSErrorIOErrorloggerwarning)r+rfprrr	_is_shellgs
zScriptMaker._is_shellcCsD||r*ddl}|jjddkr<|Sn|dr<|Sd|S)Nrzos.nameZLinuxz
jython.exez/usr/bin/env %s)r?rlangZSystemZgetPropertylowerendswith)r+rrrrr_fix_jython_executabless
z"ScriptMaker._fix_jython_executablecCstjdkrd}n8t|t|d}tjdkr4d}nd}d|koF||k}|r^d||d	}n d
}|d||d7}|d
7}|S)a
        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
        rTdarwini s#!
s
#!/bin/sh
s	'''exec' s "$0" "$@"
s' ''')r!r"lenr)platform)r+rpost_interpZsimple_shebangZshebang_lengthZmax_shebang_lengthresultrrr_build_shebangs

zScriptMaker._build_shebangcCs~d}|jr|j}d}nts&t}nxtrLtjtddt	d}nRtjt	ddt	dt	df}tj
|stjt	ddt	d}|r|||}tj
d	r||}|rt|}|d
}tj
dkrd|krd
|kr|d7}|||}y|d
Wn"tk
r8td|YnX|d
krzy||Wn&tk
rxtd||fYnX|S)NTFscriptszpython%sEXEBINDIRz
python%s%sVERSIONrzutf-8Zcliz	-X:Framesz
-X:FullFramess
 -X:Framesz,The shebang (%r) is not decodable from utf-8z?The shebang (%r) is not decodable from the script encoding (%r))rrZis_python_buildrr
r!r1r3Zget_pathget_config_varisfiler6r)rJrrCrencoderMdecodeUnicodeDecodeError
ValueError)r+encodingrKr4Zenquotershebangrrr_get_shebangsP




zScriptMaker._get_shebangcCs$|jt|j|jdd|jdS)N.r)moduleZimport_namefunc)script_templatedictprefixsuffixr)r+entryrrr_get_script_texts
zScriptMaker._get_script_textcCstj|}|j|S)N)r!r1basenamemanifest)r+Zexenamebaserrrget_manifestszScriptMaker.get_manifestcCs|jo
|j}tjd}||s*||7}|s8||}nZ|dkrL|d}n
|d}t}	t|	d}
|
	d|WdQRX|	
}|||}x`|D]V}tj|j
|}
|r|tj|
\}}|dr|}
d|
}
y|j|
|Wntk
rxtdd	|
}tj|r*t|t|
||j|
|td
yt|Wntk
rrYnXYnXnl|jr|
d|sd|
|f}
tj|
r|jstd
|
q|j|
||jr|j|
g||
qWdS)Nzutf-8pytwz__main__.pyz.pyz%s.exez:Failed to write executable - trying to use .deleteme logicz%s.deletemez0Able to replace executable using .deleteme logicr\z%s.%szSkipping existing file %s)rr(r!lineseprUrB
_get_launcherrrwritestrgetvaluer1r3rsplitextrr'Zwrite_binary_file	Exceptionr<r=existsremoverenamedebugr r$set_executable_modeappend)r+namesrZZscript_bytes	filenamesextZuse_launcherrlZlauncherstreamzfZzip_datar"outnameneZdfnamerrr
_write_scriptsX






zScriptMaker._write_script-cCsnt}d|jkr||d|jkr<|d||jdfd|jkrj|d||j|jd|jdf|S)NrXz%s%srzX.Yz	%s%s%s.%sr)r%r&addr*variant_separator)r+r"rLrrrget_script_filenames$s



z ScriptMaker.get_script_filenamesc
Csd}|r0|dg}|r0dd|}|d}|jd||d}||d}||j}|rr|ddrrd	}	nd
}	||||||	dS)NrNZinterpreter_argsz %srzutf-8)r4r.Fpywri)r0r3rUr[rdrr"r)
r+rcryr4rKargsrZscriptZscriptnamesrzrrr_make_script/s
zScriptMaker._make_scriptcCsd}tj|jt|}tj|jtj|}|jsT|j	||sTt
d|dSyt|d}Wn t
k
r|jszd}YnFX|}|st
d|dSt|dd}|rd}|dpd	}|s|r||j|||jr|j|g||nt
d
||j|jjs~t|j\}	}
|d||	|}d|krVd
}nd}tj|}
||
g|||||r|dS)NFznot copying %s (up-to-date)rbz%s is an empty file (skipping)s
rHTrrNzcopying and adjusting %s -> %srspythonwrri) r!r1r3rr
rrerr'newerr<rur8r;r,readliner=
FIRST_LINE_REmatchr2groupclose	copy_filer$rvrwinforseekr[rr9)r+rryZadjustr}fZ
first_linerrKrYlinesrZrzr~rrr_copy_script?sP



zScriptMaker._copy_scriptcCs|jjS)N)r'r,)r+rrrr,rszScriptMaker.dry_runcCs||j_dS)N)r'r,)r+valuerrrr,vsrcCsttddkrd}nd}tdkr&dnd}d|||f}td	d
d}t||}|snd||f}t||jS)
NPZ64Z32z	win-arm64z-armrz
%s%s%s.exer\rrz(Unable to find resource %s in package %s)	structcalcsizer__name__rsplitrfindrXbytes)r+kindbitsZplatform_suffixr"Zdistlib_packageresourcemsgrrrrm~szScriptMaker._get_launchercCs6g}t|}|dkr"|||n|j|||d|S)a
        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.
        N)r4)r	rr)r+
specificationr4ryrcrrrmakeszScriptMaker.makecCs(g}x|D]}||||q
W|S)z
        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,
        )extendr)r+Zspecificationsr4ryrrrr
make_multiples
zScriptMaker.make_multiple)TFN)rNN)N)N)N)"r
__module____qualname____doc__SCRIPT_TEMPLATEr_rr-r6r)rJrr?rCrMr[rd_DEFAULT_MANIFESTrfrhrrrrrpropertyr,setterr!r"r#rmrrrrrrrEs2

E4
3
r) iorloggingr!rerr)compatrrrZ	resourcesrutilrr	r
rrr
	getLoggerrr<striprcompilerrrZ_enquote_executableobjectrrrrr<module>s