grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026o ®û|joã@sÄddlZddlZddlZddlZddlZddlZddlZgd¢ZdZej   d¡r+dZ ne  ¡Z Gdd„de ƒZejdd „ƒZd d „Zdd d „Z  ddd„Zdd„Zddd„Zedkr`eƒdSdS)éN)Ú ZipAppErrorÚcreate_archiveÚget_interpreterz8# -*- coding: utf-8 -*- import {module} {module}.{fn}() Úwinúutf-8c@s eZdZdS)rN)Ú__name__Ú __module__Ú __qualname__©r r ú-/opt/alt/python310/lib64/python3.10/zipapp.pyr!srccsR�t|ttjfƒr$t||ƒ� }|VWdƒdS1swYdS|VdS©N)Ú isinstanceÚstrÚosÚPathLikeÚopen)ÚarchiveÚmodeÚfr r r Ú _maybe_open%s € "ÿ rcCs* |rd| t¡d}| |¡dSdS)Nó#!ó )ÚencodeÚshebang_encodingÚwrite)rÚ interpreterZshebangr r r Ú_write_file_prefix.s þrc CsÈ t|dƒ�<}| d¡}|dkrd}| ¡t|dƒ�}t||ƒ| |¡t ||¡Wdƒn1s6wYWdƒn1sEwY|r`t|tƒrbt   |t   |¡j t j B¡dSdSdS)NÚrbéróÚwb)rÚreadÚreadlinerrÚshutilZ copyfileobjr rrÚchmodÚstatÚst_modeÚS_IEXEC)rZ new_archiverÚsrcZfirst_2Zdstr r r Ú _copy_archive5s      ú€÷ÿr)Fc Cs d}t|dƒrt|dƒrd}n t |¡}| ¡rd}|r%t|||ƒdS| ¡s-tdƒ‚|d ¡}|r;|r;tdƒ‚|sC|sCtdƒ‚d}|r|| d ¡\} } } td d „|   d ¡Dƒƒ} td d „|   d ¡Dƒƒ} | d kro| ro| sutd|ƒ‚t j | | d�}|dur†|  d¡}n t|dƒs�t |¡}t |dƒ�U}t||ƒ|r tjntj}tj|d|d��0}| d¡D]}| |¡}|dusÀ||ƒrÈ| || ¡¡q±|rÔ| d| d¡¡Wdƒn1sÞwYWdƒn1síwY|�rt|dƒ�s | | ¡jtjB¡dSdSdS)NFr!r"TzSource does not existz __main__.pyz8Cannot specify entry point if the source has __main__.pyzArchive has no entry pointú:csó�|]}| ¡VqdSr ©Ú isidentifier©Ú.0Úpartr r r Ú {ó€z!create_archive..Ú.csr+r r,r.r r r r1|r2zInvalid entry point: )ÚmoduleÚfnz.pyzrr Úw)Ú compressionÚ*r)ÚhasattrÚpathlibZPathÚis_filer)ÚexistsrÚ partitionÚallÚsplitÚ MAIN_TEMPLATEÚformatZ with_suffixrrÚzipfileZ ZIP_DEFLATEDZ ZIP_STOREDZZipFileZrglobZ relative_torZas_posixZwritestrrr$r%r&r')ÚsourceÚtargetrÚmainÚfilterÚ compressedZsource_is_fileZhas_mainZmain_pyÚmodÚsepr5Zmod_okZfn_okÚfdr7ÚzÚchildZarcnamer r r rLsf   ÿ       ÿ €€ú€ü ÿrcCs^t|dƒ� }| d¡dkr| ¡ ¡ t¡WdƒSWdƒdS1s(wYdS)Nrrr)rr!r"ÚstripÚdecoder)rrr r r r–s þ"ÿrcCs4 ddl}| ¡}|jddddd�|jddddd�|jd d dd d�|jd d ddd�|jddddd�|jddd�| |¡}|jrctj |j¡sPt dƒ‚t |jƒ}t d  |p[d¡ƒt  d¡tj |j¡rŠ|jdustj |j¡rƒtj |j|j¡rƒt dƒ‚|jrŠt dƒ‚t|j|j|j|j|jd�dS)Nrz--outputz-ozAThe name of the output archive. Required if SOURCE is an archive.)ÚdefaultÚhelpz--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 --compressz-cÚ store_truezQCompress files with the deflate method. Files are stored uncompressed by default.)ÚactionrPz--infoFz)Display the interpreter from the archive.)rOrRrPrCz'Source directory (or existing archive).)rPz%Can only get info for an archive filezInterpreter: {}zz-In-place editing of archives is not supportedz,Cannot change the main function when copying)rrErG)ÚargparseÚArgumentParserÚ add_argumentÚ parse_argsÚinforÚpathÚisfilerCÚ SystemExitrÚprintrAÚsysÚexitÚoutputr<ÚsamefilerErZpythonÚcompress)ÚargsrSÚparserrr r r rEœsN ÿ ÿ ÿ ÿ ÿÿ   ÿ  þrEÚ__main__r )NNNNF)Ú contextlibrr:r#r%r\rBÚ__all__r@ÚplatformÚ startswithrÚgetfilesystemencodingÚ ValueErrorrÚcontextmanagerrrr)rrrErr r r r Ús2    ÿJ 1 ÿ