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/lib/python3.9/site-packages/setuptools/command/__pycache__/bdist_egg.cpython-39.opt-1.pyc
a

>��hDG�@sBdZddlmZddlmZmZddlmZddlm	Z	ddl
Z
ddlZddlZddl
Z
ddlZddlZddlmZmZmZddlmZdd	lmZdd
lmZmZddlmZmZdd
�Zdd�Zdd�Zdd�Z Gdd�de�Z!e"�#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�)�DistutilsSetupError)�remove_tree�mkpath)�log)�CodeTypeN)�get_build_platform�Distribution�ensure_directory)�
EntryPoint)�Library)�Command�SetuptoolsDeprecationWarning)�get_path�get_python_versioncCstd�S)NZpurelib)r�rr�@/usr/lib/python3.9/site-packages/setuptools/command/bdist_egg.py�_get_purelibsrcCs2d|vrtj�|�d}|�d�r.|dd�}|S)N�.r�modulei����)�os�path�splitext�endswith)�filenamerrr�strip_modules

rccs6t�|�D]&\}}}|��|��|||fVq
dS)zbDo os.walk in a reproducible way,
    independent of indeterministic filesystem readdir order
    N)r�walk�sort)�dir�base�dirs�filesrrr�sorted_walk$sr!cCsJt�d���}t|d��}|�||�Wd�n1s<0YdS)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_optionsUszbdist_egg.initialize_optionscCs�|�d�}|_|j|_|jdur>|�d�j}tj�|d�|_|jdurPt	�|_|�
dd�|jdur�tdd|j
|jt�|j��o�|j��
�}tj�|j|d�|_dS)N�egg_infoZbdistZegg)r7r7z.egg)�get_finalized_command�ei_cmdr>r4�
bdist_baserr�joinr5rZset_undefined_optionsr9rZegg_nameZegg_versionr�distribution�has_ext_modulesr7)r<r@rA�basenamerrr�finalize_options^s


�zbdist_egg.finalize_optionscCs�|j|�d�_tj�tj�t���}|jj	g}|j_	|D]�}t
|t�r�t|�dkr�tj�
|d�r�tj�|d�}tj�|�}||ks�|�|tj�r�|t|�dd�|df}|jj	�|�q:z*t�d|j�|jdddd�W||j_	n
||j_	0dS)N�install�r�zinstalling package data to %s�install_data)�force�root)r4r?�install_librr�normcase�realpathrrC�
data_files�
isinstance�tuple�len�isabs�
startswith�sep�appendr�info�call_command)r<Z
site_packages�old�itemrOZ
normalizedrrr�do_install_datavs"�zbdist_egg.do_install_datacCs|jgS)N)r9r;rrr�get_outputs�szbdist_egg.get_outputscKsTtD]}|�||j�q|�d|j�|�d|j�|j|fi|��}|�|�|S)z8Invoke reinitialized command `cmdname` with keyword argsr8�dry_run)�INSTALL_DIRECTORY_ATTRS�
setdefaultr4r8r^Zreinitialize_command�run_command)r<Zcmdname�kw�dirname�cmdrrrrY�s
zbdist_egg.call_commandcCs�|�d�t�d|j�|�d�}|j}d|_|j��rH|jsH|�d�|j	ddd�}||_|�
�\}}g|_g}t|�D]|\}}t
j�|�\}	}
t
j�|jt|	�d�}|j�|�t�d	|�|js�tt
j�|�|�|�|�|�t
jd
�||<qz|�r|�|�|jj�r|��|j}t
j�|d�}
|�|
�|jj�rlt
j�|
d�}t�d
|�|j	d|dd�|�|
�t
j�|
d�}|�r�t�d|�|j�st|�t|d�}|� d�|��|� d�|�!�n,t
j�"|��rt�d|�|j�st
�#|�t$t
j�|d�|�%��t
j�&t
j�|j'd���r<t�(d�|j)�rL|�*�t+|j,||j-|j|�.�d�|j/�s�t0|j|jd�t1|jdg��dt2�|j,f�dS)Nr>zinstalling library code to %srGZ
build_clibrMr)Zwarn_dir�.pyzcreating stub loader for %s�/�EGG-INFO�scriptszinstalling scripts to %sZinstall_scriptsrI)�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.)�verboser^�mode�r^Z
dist_filesr,)3rarrXr4r?rLrCZhas_c_librariesr8rY�get_ext_outputs�stubs�	enumeraterrrrBrrWr^r+rE�replacerVZbyte_compilerPr\rrh�copy_metadata_tor	r&r'�close�isfile�unlink�write_safety_flag�zip_safe�existsr>�warnr:�zap_pyfiles�make_zipfiler9rl�
gen_headerr6r�getattrr)r<ZinstcmdZold_rootrd�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]�}tj�||�}|�d�rTt�d|�t�	|�|�d�r"|}d}t
�||�}tj�|tj|�
d�d�}	t�d||	f�zt�|	�Wnty�Yn0t�||	�q"qdS)	Nz+Removing .py files from temporary directoryrezDeleting %s�__pycache__z#(?P<name>.+)\.(?P<magic>[^.]+)\.pyc�name�.pyczRenaming file from [%s] to [%s])rrX�walk_eggr4rrrBr�debugrv�re�match�pardir�group�remove�OSError�rename)
r<rrr r�rZpath_old�pattern�mZpath_newrrrr{�s0



���zbdist_egg.zap_pyfilescCs2t|jdd�}|dur|St�d�t|j|j�S)Nrxz4zip_safe flag not set; analyzing archive contents...)r~rCrrz�analyze_eggr4rp)r<�saferrrrxs

zbdist_egg.zip_safec
Cs�t�|jjpd�}|�di��d�}|dur0dSt�dt�|jrH|j	rVt
d|f��djtj
�}|j}d�|j�}|jd	}tj�|j�}d
t�}|js�ttj�|j�|jd�t|jd�}	|	�|�|	��dS)
N�zsetuptools.installationZeggsecutabler"zEEggsecutables are deprecated and will be removed in a future version.zGeggsecutable entry point (%r) cannot have 'extras' or refer to a modulez{}.{}rraH#!/bin/sh
if [ `basename $0` = "%(basename)s" ]
then exec python%(pyver)s -c "import sys, os; sys.path.insert(0, os.path.abspath('$0')); from %(pkg)s import %(base)s; sys.exit(%(full)s())" "$@"
else
  echo $0 is not the correct name for this egg file.
  echo Please rename it back to %(basename)s and try again.
  exec false
fi
rn�a)r
Z	parse_maprCZentry_points�get�warningsrzr
�attrsZextrasr�format�sys�version_infoZmodule_namerBrrrEr9�localsr^rrcr&r'rt)
r<ZepmZepZpyver�pkgZfullrrE�headerr*rrrr}s8���
�
zbdist_egg.gen_headercCshtj�|j�}tj�|d�}|jjjD]<}|�|�r&tj�||t	|�d��}t
|�|�||�q&dS)z*Copy metadata (egg info) to the target_dirr�N)rr�normpathr>rBr@Zfilelistr rUrSr	Z	copy_file)r<Z
target_dirZ
norm_egg_info�prefixr�targetrrrrs;s
zbdist_egg.copy_metadata_tocCsg}g}|jdi}t|j�D]f\}}}|D].}tj�|�d��tvr*|�|||�q*|D]"}|||d|tj�||�<q^q|j	�
�r�|�d�}|jD]Z}	t
|	t�r�q�|�|	j�}
|�|
�}tj�|��d�s�tj�tj�|j|��r�|�|�q�||fS)zAGet a list of relative paths to C extensions in the output distror�rIrfZ	build_extzdl-)r4r!rrr�lower�NATIVE_EXTENSIONSrWrBrCrDr?�
extensionsrQrZget_ext_fullnamer�Zget_ext_filenamerErUry)r<rr��pathsrrr rZ	build_cmdr��fullnamerrrroGs0
��




zbdist_egg.get_ext_outputsN)�__name__�
__module__�__qualname__�descriptionrZuser_optionsZboolean_optionsr=rFr\r]rYr�r{rxr}rsrorrrrr,>s,��	
Q-r,z.dll .so .dylib .pydccsHt|�}t|�\}}}d|vr(|�d�|||fV|D]
}|Vq8dS)z@Walk an unpacked egg's contents, skipping the metadata directoryrgN)r!�nextr�)�egg_dirZwalkerrrr Zbdfrrrr�gs
r�c	Cs�t��D](\}}tj�tj�|d|��r|Sqt�s<dSd}t|�D]R\}}}|D]B}|�d�sV|�d�rrqVqV|�d�s�|�d�rVt	||||�o�|}qVqH|S)NrgFTrez.pywr�z.pyo)
�safety_flags�itemsrrryrB�can_scanr�r�scan_module)	r�rp�flag�fnr�rrr r�rrrr�rs
r�cCs�t��D]r\}}tj�||�}tj�|�rJ|dus>t|�|krzt�|�q|durt|�|krt|d�}|�	d�|�
�qdS)Nrjrk)r�r�rrrBry�boolrvr&r'rt)r�r�r�r�r*rrrrw�s

rwzzip-safeznot-zip-safe)TFc
Cstj�||�}|dd�|vr"dS|t|�dd��tjd�}||rJdpLdtj�|�d}tjdkrpd	}nd
}t	|d�}|�
|�t�|�}	|�
�d}
t�t|	��}dD]}||vr�t�d
||�d}
q�d|vr�dD]}||vr�t�d||�d}
q�|
S)z;Check whether module possibly uses unsafe-for-zipfile stuffN���TrIrr�r)�����rb)�__file__�__path__z%s: module references %sF�inspect)Z	getsourceZ
getabsfileZ
getsourcefileZgetfilegetsourcelinesZ
findsourceZgetcommentsZgetframeinfoZgetinnerframesZgetouterframes�stackZtracez"%s: module MAY be using inspect.%s)rrrBrSrrrVrr�r�r&�read�marshal�loadrt�dict�fromkeys�iter_symbolsrrz)
r�rr�rprr�r�skipr*�coder�ZsymbolsZbadrrrr��s0 



r�ccsR|jD]
}|Vq|jD]4}t|t�r.|Vqt|t�rt|�D]
}|Vq@qdS)zBYield names and strings used by `code` and its nested code objectsN)�co_names�	co_constsrQ�strrr�)r�r��constrrrr��s



r�cCs2tj�d�stjdkrdSt�d�t�d�dS)N�javaZcliTz1Unable 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��platformrUrrzrrrrr��s
r�)rMrirJZinstall_baseTr"c
s�ddl}ttj�|��d�t�d|����fdd�}|rB|jn|j}�s�|j	|||d�}	t
��D]\}
}}||	|
|�qd|	��n t
��D]\}
}}|d|
|�q�|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.
    rNrnz#creating '%s' and adding '%s' to itcs`|D]V}tj�tj�||��}tj�|�r|t��dd�}�sN|�||�t�d|�qdS)NrIzadding '%s')	rrr�rBrurSr'rr�)�zrc�namesr�rr.��base_dirr^rr�visit�szmake_zipfile.<locals>.visit)�compression)�zipfilerrrrcrrXZZIP_DEFLATEDZ
ZIP_STOREDZZipFiler!rt)
Zzip_filenamer�rlr^�compressrmr�r�r�r�rcrr rr�rr|�s	
r|)rrTr")/�__doc__Zdistutils.errorsrZdistutils.dir_utilrrZ	distutilsr�typesrr�rr�r#r�r�Z
pkg_resourcesrrr	r
Zsetuptools.extensionrZ
setuptoolsrr
Z	sysconfigrrrrr!r+r,r�r��splitr�r�r�rwr�r�r�r�r_r|rrrr�<module>sH
(�"�