MINI MINI MANI MO

Path : /usr/lib64/python3.6/__pycache__/
File Upload :
Current File : //usr/lib64/python3.6/__pycache__/zipapp.cpython-36.opt-2.pyc

3


 \@sddlZddlZddlZddlZddlZddlZddlZdddgZdZej	j
drXdZnejZGddde
Zejd	d
ZddZdd
dZdddZddZdddZedkredS)NZipAppErrorcreate_archiveget_interpreterz8# -*- coding: utf-8 -*-
import {module}
{module}.{fn}()
winzutf-8c@seZdZdS)rN)__name__
__module____qualname__r	r	/usr/lib64/python3.6/zipapp.pyr!sc	csFt|tjrt|}t|tr<t||}|VWdQRXn|VdS)N)
isinstancepathlibPathstropen)archivemodefr	r	r
_maybe_open%s
rcCs$|r d|jtd}|j|dS)Ns#!
)encodeshebang_encodingwrite)rinterpreterZshebangr	r	r
_write_file_prefix0srcCst|dZ}|jd}|dkr*d}|jt|d&}t|||j|tj||WdQRXWdQRX|rt|trt	j
|t	j|jtj
BdS)Nrbs#!wb)rreadreadlinerrshutilZcopyfileobjrroschmodstatst_modeS_IEXEC)rZnew_archiversrcZfirst_2dstr	r	r

_copy_archive7s


 r(cCsd}t|drt|drd}ntj|}|jr4d}|rHt|||dS|jsXtd|dj}|rt|rttd|pz|stdd}|r|jd	\}}}	td
d|j	dD}
td
d|	j	dD}|d	ko|
o|std|t
j||	d}|dkr|jd}nt|ds"tj|}t
|d~}t||tj|d\}
tj|}x2|jdD]$}t|j|}|
jt||q\W|r|
jd|jdWdQRXWdQRX|rt|dr|j|jjtjBdS)NFrrTzSource does not existz__main__.pyz8Cannot specify entry point if the source has __main__.pyzArchive has no entry point:css|]}|jVqdS)N)isidentifier).0partr	r	r
	<genexpr>|sz!create_archive.<locals>.<genexpr>.css|]}|jVqdS)N)r*)r+r,r	r	r
r-}szInvalid entry point: )modulefnz.pyzrrw*zutf-8)hasattrrr
is_filer(existsr	partitionallsplit
MAIN_TEMPLATEformatZwith_suffixrrzipfileZZipFileZrglobrZrelative_torZwritestrrr"r#r$r%)sourcetargetrmainZsource_is_fileZhas_mainZmain_pymodsepr0Zmod_okZfn_okfdzrootZchildZarcnamer	r	r
rNsP




&c	Cs:t|d&}|jddkr,|jjjtSWdQRXdS)Nrrs#!)rrrstripdecoder)rrr	r	r
rscCs ddl}|j}|jddddd|jddddd|jd	d
ddd|jdd
ddd|jddd|j|}|jrtjj|jst	dt
|j}tdj|pdt
jdtjj|jr|jdkstjj|jrtjj|j|jrt	d|jrt	dt|j|j|j|jddS)Nrz--outputz-ozAThe name of the output archive. Required if SOURCE is an archive.)defaulthelpz--pythonz-pzEThe name of the Python interpreter to use (default: no shebang line).z--mainz-mzLThe main function of the application (default: use an existing __main__.py).z--infoF
store_truez)Display the interpreter from the archive.)rFactionrGr<z'Source directory (or existing archive).)rGz%Can only get info for an archive filezInterpreter: {}z<none>z-In-place editing of archives is not supportedz,Cannot change the main function when copying)rr>)argparseArgumentParseradd_argument
parse_argsinfor!pathisfiler<
SystemExitrprintr:sysexitoutputr5samefiler>rpython)argsrJparserrr	r	r
r>s6







r>__main__)N)NNN)N)
contextlibr!rr r#rSr;__all__r9platform
startswithrgetfilesystemencoding
ValueErrorrcontextmanagerrrr(rrr>rr	r	r	r
<module>s(


G
-

OHA YOOOO