HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/local/lib/python3.10/site-packages/setuptools/command/__pycache__/bdist_egg.cpython-310.pyc
o

��i�@�@s*dZddlmZmZddlmZddlmZddlZddl	Z	ddl
Z
ddlZddlZddl
mZmZddlmZddlmZd	d
lmZddlmZmZdd
�Zdd�Zdd�Zdd�ZGdd�de�Ze�d� ��Z!dd�Z"dd�Z#dd�Z$ddd�Z%d d!�Z&d"d#�Z'd$d%�Z(gd&�Z)	'	(d+d)d*�Z*dS),z6setuptools.command.bdist_egg

Build .egg distributions�)�remove_tree�mkpath)�log)�CodeTypeN)�get_build_platform�Distribution)�Library)�Command�)�ensure_directory)�get_path�get_python_versioncCstd�S)N�purelib)r�rr�G/usr/local/lib/python3.10/site-packages/setuptools/command/bdist_egg.py�_get_purelib�rcCs2d|vrtj�|�d}|�d�r|dd�}|S)N�.r�modulei����)�os�path�splitext�endswith)�filenamerrr�strip_modules

rccs8�t�|�D]\}}}|��|��|||fVqdS)zbDo os.walk in a reproducible way,
    independent of indeterministic filesystem readdir order
    N)r�walk�sort)�dir�base�dirs�filesrrr�sorted_walk"s��r!cCsLt�d���}t|d��}|�||�Wd�dS1swYdS)Na�
        def __bootstrap__():
            global __bootstrap__, __loader__, __file__
            import sys, pkg_resources, importlib.util
            __file__ = pkg_resources.resource_filename(__name__, %r)
            __loader__ = None; del __bootstrap__, __loader__
            spec = importlib.util.spec_from_file_location(__name__,__file__)
            mod = importlib.util.module_from_spec(spec)
            spec.loader.exec_module(mod)
        __bootstrap__()
        �w)�textwrap�dedent�lstrip�open�write)�resource�pyfileZ_stub_template�frrr�
write_stub,s
�"�r+c@s�eZdZdZdddde�fdddd	gZgd
�Zdd�Zd
d�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd �Zd!S)"�	bdist_eggzcreate an "egg" distribution)z
bdist-dir=�bz1temporary directory for creating the distributionz
plat-name=�pz;platform name to embed in generated filenames (default: %s))�exclude-source-filesNz+remove all .py files from the generated egg)�	keep-temp�kzPkeep the pseudo-installation tree around after creating the distribution archive)z	dist-dir=�dz-directory to put final built distributions in)�
skip-buildNz2skip rebuilding everything (for testing/debugging))r0r3r/cCs.d|_d|_d|_d|_d|_d|_d|_dS)Nr)�	bdist_dir�	plat_name�	keep_temp�dist_dir�
skip_build�
egg_output�exclude_source_files��selfrrr�initialize_optionsSs
zbdist_egg.initialize_optionscCs�|�d�}|_|j|_|jdur|�d�j}tj�|d�|_|jdur(t	�|_|�
dd�|jdurTtdd|j
|jt�|j��oC|j��
�}tj�|j|d�|_dSdS)N�egg_infoZbdist�egg)r7r7z.egg)�get_finalized_command�ei_cmdr>r4�
bdist_baserr�joinr5rZset_undefined_optionsr9r�egg_nameZegg_versionr
�distribution�has_ext_modulesr7)r<rArB�basenamerrr�finalize_options\s$


���zbdist_egg.finalize_optionscCs�|j|�d�_tj�tj�t���}|jj	g}|j_	|D]D}t
|t�rZt|�dkrZtj�
|d�rZtj�|d�}tj�|�}||ksL|�|tj�rZ|t|�dd�|df}|jj	�|�qzt�d|j�|jdddd�W||j_	dS||j_	w)N�installr
r�zinstalling package data to %s�install_data)�force�root)r4r@�install_librr�normcase�realpathrrE�
data_files�
isinstance�tuple�len�isabs�
startswith�sep�appendr�info�call_command)r<�
site_packages�old�itemrP�
normalizedrrr�do_install_datats"�zbdist_egg.do_install_datacCs|jgS)N)r9r;rrr�get_outputs�rzbdist_egg.get_outputscKsTtD]	}|�||j�q|�d|j�|�d|j�|j|fi|��}|�|�|S)z8Invoke reinitialized command `cmdname` with keyword argsr8�dry_run)�INSTALL_DIRECTORY_ATTRS�
setdefaultr4r8raZreinitialize_command�run_command)r<Zcmdname�kw�dirname�cmdrrrrZ�s
zbdist_egg.call_commandcCs�|�d�t�d|j�|�d�}|j}d|_|j��r$|js$|�d�|j	ddd�}||_|�
�\}}g|_g}t|�D]>\}}t
j�|�\}	}
t
j�|jt|	�d�}|j�|�t�d	|�|jsmtt
j�|�|�|�|�|�t
jd
�||<q=|r�|�|�|jjr�|��|j}t
j�|d�}
|�|
�|jjr�t
j�|
d�}t�d
|�|j	d|dd�|�|
�t
j�|
d�}|r�t�d|�|js�t|�t|d�}|� d�|��|� d�|�!�nt
j�"|�r�t�d|�|js�t
�#|�t$t
j�|d�|�%��t
j�&t
j�|j'd���rt�(d�|j)�r|�*�t+|j,||j-|j|�.�d�|j/�s9t0|j|jd�t1|jdg��dt2�|j,f�dS)Nr>zinstalling library code to %srIZ
build_clibrNr)Zwarn_dir�.pyzcreating stub loader for %s�/�EGG-INFO�scriptszinstalling scripts to %sZinstall_scriptsrJ)�install_dirZno_epznative_libs.txtz
writing %s�wt�
zremoving %szdepends.txtzxWARNING: 'depends.txt' will not be used by setuptools 0.6!
Use the install_requires/extras_require setup() args instead.)�verbosera�mode�raZ
dist_filesr,)3rdrrYr4r@rMrEZhas_c_librariesr8rZ�get_ext_outputs�stubs�	enumeraterrrrCrrXrar+rG�replacerW�byte_compilerQr_rrk�copy_metadata_torr&r'�close�isfile�unlink�write_safety_flag�zip_safe�existsr>�warnr:�zap_pyfiles�make_zipfiler9ro�
gen_headerr6r�getattrr
)r<ZinstcmdZold_rootrg�all_outputs�ext_outputsZ
to_compiler.Zext_namer�extr)Zarchive_rootr>Z
script_dirZnative_libsZ	libs_filerrr�run�s�


�


�


�
��
��z
bdist_egg.runc

Cs�t�d�t|j�D]^\}}}|D]V}tj�||�}|�d�r*t�d|�t�	|�|�d�rg|}d}t
�||�}tj�|tj|�
d�d�}	t�d||	f�zt�|	�Wn	ty`Ynwt�||	�qq
dS)	Nz+Removing .py files from temporary directoryrhzDeleting %s�__pycache__z#(?P<name>.+)\.(?P<magic>[^.]+)\.pyc�name�.pyczRenaming file from [%s] to [%s])rrY�walk_eggr4rrrCr�debugrz�re�match�pardir�group�remove�OSError�rename)
r<rrr r�rZpath_old�pattern�mZpath_newrrrr�s8



�������zbdist_egg.zap_pyfilescCs2t|jdd�}|dur
|St�d�t|j|j�S)Nr|z4zip_safe flag not set; analyzing archive contents...)r�rErr~�analyze_eggr4rs)r<�saferrrr|s

zbdist_egg.zip_safecCsdS)Nr"rr;rrrr�szbdist_egg.gen_headercCshtj�|j�}tj�|d�}|jjjD]}|�|�r1tj�||t	|�d��}t
|�|�||�qdS)z*Copy metadata (egg info) to the target_dir�N)rr�normpathr>rCrA�filelistr rVrTr�	copy_file)r<�
target_dirZ
norm_egg_info�prefixr�targetrrrrws
��zbdist_egg.copy_metadata_tocCsg}g}|jdi}t|j�D]3\}}}|D]}tj�|�d��tvr,|�|||�q|D]}|||d|tj�||�<q/q|j	�
�r}|�d�}|jD]-}	t
|	t�rWqO|�|	j�}
|�|
�}tj�|��d�s|tj�tj�|j|��r||�|�qO||fS)zAGet a list of relative paths to C extensions in the output distror�rJriZ	build_extzdl-)r4r!rrr�lower�NATIVE_EXTENSIONSrXrCrErFr@�
extensionsrRrZget_ext_fullnamer�Zget_ext_filenamerGrVr})r<r�r��pathsrrr rZ	build_cmdr��fullnamerrrrrs6
����





�zbdist_egg.get_ext_outputsN)�__name__�
__module__�__qualname__�descriptionrZuser_optionsZboolean_optionsr=rHr_r`rZr�rr|r�rwrrrrrrr,<s.��	
Qr,z.dll .so .dylib .pydccsJ�t|�}t|�\}}}d|vr|�d�|||fV|D]}|VqdS)z@Walk an unpacked egg's contents, skipping the metadata directoryrjN)r!�nextr�)�egg_dirZwalkerrrr Zbdfrrrr�;s�
�r�c	Cs�t��D]\}}tj�tj�|d|��r|Sqt�sdSd}t|�D](\}}}|D] }|�d�s7|�d�r8q+|�d�sB|�d�rKt	||||�oJ|}q+q$|S)NrjFTrhz.pywr�z.pyo)
�safety_flags�itemsrrr}rC�can_scanr�r�scan_module)	r�rs�flag�fnr�rrr r�rrrr�Fs ���r�cCs�t��D]9\}}tj�||�}tj�|�r%|dust|�|kr$t�|�q|dur=t|�|kr=t|d�}|�	d�|�
�qdS)Nrmrn)r�r�rrrCr}�boolrzr&r'rx)r�r�r�r�r*rrrr{Xs
�

��r{zzip-safeznot-zip-safe)TFc
Cstj�||�}|dd�|vrdS|t|�dd��tjd�}||r%dp&dtj�|�d}tjdkr8d	}nd
}t	|d�}|�
|�t�|�}	|�
�d}
t�t|	��}dD]}||vrgt�d
||�d}
qXd|vr~dD]}||vr}t�d||�d}
qn|
S)z;Check whether module possibly uses unsafe-for-zipfile stuffN���TrJrr�r)�����rb)�__file__�__path__z%s: module references %sF�inspect)�	getsource�
getabsfile�
getsourcefileZgetfilegetsourcelines�
findsource�getcomments�getframeinfo�getinnerframes�getouterframes�stack�tracez"%s: module MAY be using inspect.%s)rrrCrTrurWr�sys�version_infor&�read�marshal�loadrx�dict�fromkeys�iter_symbolsrr~)
r�rr�rsr�pkgr�skipr*�coder��symbols�badrrrr�ks4 



��r�ccsT�|jD]}|Vq|jD]}t|t�r|Vq
t|t�r't|�D]}|Vq!q
dS)zBYield names and strings used by `code` and its nested code objectsN)�co_names�	co_constsrR�strrr�)r�r��constrrrr��s�



��r�cCs2tj�d�s
tjdkr
dSt�d�t�d�dS)N�java�cliTz1Unable to analyze compiled code on this platform.zfPlease ask the author to include a 'zip_safe' setting (either True or False) in the package's setup.py)r��platformrVrr~rrrrr��s
r�)rNrlrKZinstall_baseTr"c
s�ddl}ttj�|��d�t�d|����fdd�}|r!|jn|j}�sD|j	|||d�}	t
��D]\}
}}||	|
|�q2|	��|St
��D]\}
}}|d|
|�qH|S)aqCreate a zip file from all the files under 'base_dir'.  The output
    zip file will be named 'base_dir' + ".zip".  Uses either the "zipfile"
    Python module (if available) or the InfoZIP "zip" utility (if installed
    and found on the default search path).  If neither tool is available,
    raises DistutilsExecError.  Returns the name of the output zip file.
    rNrqz#creating '%s' and adding '%s' to itcs`|D]+}tj�tj�||��}tj�|�r-|t��dd�}�s'|�||�t�d|�qdS)NrJzadding '%s')	rrr�rCryrTr'rr�)�zrf�namesr�rr.��base_dirrarr�visit�s��zmake_zipfile.<locals>.visit)�compression)�zipfilerrrrfrrY�ZIP_DEFLATED�
ZIP_STORED�ZipFiler!rx)
�zip_filenamer�rora�compressrpr�r�r�r�rfrr rr�rr��s	�r�)rrTr")+�__doc__Zdistutils.dir_utilrr�	distutilsr�typesrr�rr�r#r��
pkg_resourcesrrZsetuptools.extensionr�
setuptoolsr	�_pathr�	sysconfigrr
rrr!r+r,r�r��splitr�r�r�r{r�r�r�r�rbr�rrrr�<module>sD
}�"�