grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026U iÛfoã@s¾ddlZddlZddlZddlZddlZddlZddlZdddgZdZej   d¡rXdZ ne  ¡Z Gdd„de ƒZejd d „ƒZd d „Zdd d„Zddd„Zdd„Zddd„ZedkrºeƒdS)é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/python38/lib64/python3.8/zipapp.pyr!sc cs8t|ttjfƒr.t||ƒ� }|VW5QRXn|VdS©N)Ú isinstanceÚstrÚosÚPathLikeÚopen)ÚarchiveÚmodeÚfr r r Ú _maybe_open%s rcCs$|r d| t¡d}| |¡dS)Nó#!ó )ÚencodeÚshebang_encodingÚwrite)rÚ interpreterZshebangr r r Ú_write_file_prefix.src Cs–t|dƒ�Z}| d¡}|dkr*d}| ¡t|dƒ�&}t||ƒ| |¡t ||¡W5QRXW5QRX|r’t|tƒr’t   |t   |¡j t j B¡dS)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}nt |¡}| ¡r4d}|rHt|||ƒdS| ¡sXtdƒ‚|d ¡}|rt|rttdƒ‚|s„|s„tdƒ‚d}|rö| d ¡\} } } td d „|   d ¡Dƒƒ} td d „|   d ¡Dƒƒ} | d krÜ| rÜ| sètd|ƒ‚t j | | d�}|dk�r |  d¡}nt|dƒ�s"t |¡}t |dƒ�–}t||ƒ|�rDtjntj}tj|d|d��^}| d¡D]4}| |¡}|dk�sˆ||ƒ�rf| || ¡¡�qf|�r´| d| d¡¡W5QRXW5QRX|�rðt|dƒ�sð| | ¡jtjB¡dS)NFr!r"TzSource does not existz __main__.pyz8Cannot specify entry point if the source has __main__.pyzArchive has no entry pointú:css|]}| ¡VqdSr ©Ú isidentifier©Ú.0Úpartr r r Ú {sz!create_archive..Ú.css|]}| ¡VqdSr r+r-r r r r0|szInvalid entry point: )ÚmoduleÚfnz.pyzrr Úw)Ú compressionÚ*r)ÚhasattrÚpathlibÚPathÚis_filer)ÚexistsrÚ partitionÚallÚsplitÚ MAIN_TEMPLATEÚformatZ with_suffixrrÚzipfileZ ZIP_DEFLATEDZ ZIP_STOREDZZipFileZrglobÚ relative_torZas_posixZwritestrrr$r%r&r')ÚsourceÚtargetrÚmainÚfilterÚ compressedZsource_is_fileZhas_mainZmain_pyÚmodÚsepr3Zmod_okZfn_okÚfdr5ÚzZchildZarcnamer r r rLsX   ÿ        ÿ &c CsFt|dƒ�2}| d¡dkr8| ¡ ¡ t¡W5QR£SW5QRXdS)Nrrr)rr!r"ÚstripÚdecoder)rrr r r r–s cCs<ddl}| ¡}|jddddd�|jddddd�|jd d dd d�|jd d ddd�|jddddd�|jddd�| |¡}|jrÄtj |j¡sžt dƒ‚t |jƒ}t d  |p´d¡ƒt  d¡tj |j¡�r|jdk�stj |j¡�r tj |j|j¡�r t dƒ‚|j�rt 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.)ÚactionrOz--infoFz)Display the interpreter from the archive.)rNrQrOrCz'Source directory (or existing archive).)rOz%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Úprintr@ÚsysÚexitÚoutputr;ÚsamefilerErÚpythonÚcompress)ÚargsrRÚparserrr r r rEœsN ÿ ÿ ÿ ÿ ÿÿ   ÿ þrEÚ__main__)N)NNNNF)N)Ú contextlibrr8r#r%r[rAÚ__all__r?ÚplatformÚ startswithrÚgetfilesystemencodingÚ ValueErrorrÚcontextmanagerrrr)rrrErr r r r Ús0    ÿ J 1