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/distutils/tests/__pycache__/test_install_lib.cpython-310.opt-2.pyc
o

�i��@s�	ddlZddlZddlZddlZddlmZddlmZddl	m
Z
ddlmZddl
mZGdd�de
je
je
jej�Zd	d
�ZedkrMee��dSdS)�N)�install_lib)�	Extension)�support)�DistutilsOptionError)�run_unittestc@sBeZdZdd�Ze�ejd�dd��Zdd�Z	dd	�Z
d
d�ZdS)
�InstallLibTestCasecCs�|��d}t|�}|��|�|jd�|�|jd�d|_|�t|j�d|_|�t|j�d|_|��|�|jd�dS)N�r�foo�4�2�)�create_distrZfinalize_options�assertEqual�compile�optimizeZassertRaisesr)�self�dist�cmd�r�=/usr/local/lib/python3.10/distutils/tests/test_install_lib.py�test_finalize_optionssz(InstallLibTestCase.test_finalize_optionszbyte-compile disabledcCs�|��\}}t�|�t|�}d|_|_tj�|d�}|�|d�|�	|g�t
jjddd�}t
jjd|jd�}|�
tj�|��|�
tj�|��dS)Nrzfoo.pyz
# python file�)�optimization)r
�os�chdirrrr�path�join�
write_file�byte_compile�	importlib�util�cache_from_sourceZ
assertTrue�exists)r�project_dirrr�fZpyc_fileZpyc_opt_filerrr�test_byte_compile%s
�z$InstallLibTestCase.test_byte_compilecC�|��\}}t�|�t�d�t|�}d|_|_|��|_tj	�
|dd�}|�|d�tddg�g|j
_dg|j
_d|j
_|��}|�t|�d|�dS)	N�spamr�__init__.py�# python packager	�xxx�setup.py�)r
rr�mkdirrrr�mkdtemp�install_dirrrrr�distribution�ext_modules�packages�script_nameZget_outputsr�len)rr#rrr$Zoutputsrrr�test_get_outputs5�



z#InstallLibTestCase.test_get_outputscCr&)	Nr'rr(r)r	r*r+r)r
rrr-rrrr.r/rrrrr0r1r2r3Z
get_inputsrr4)rr#rrr$Zinputsrrr�test_get_inputsIr6z"InstallLibTestCase.test_get_inputscCsr|��d}t|�}d|_d|_tj}dt_z
|�g�W|t_n|t_w|�d|jdd|jdd�dS)NrTzbyte-compiling is disabledrr)	r
rrr�sys�dont_write_bytecoderZassertInZlogs)rrrZold_dont_write_bytecoderrr�test_dont_write_bytecode]s�z+InstallLibTestCase.test_dont_write_bytecodeN)�__name__�
__module__�__qualname__r�unittestZskipIfr8r9r%r5r7r:rrrrrs
rcCs
t�t�S)N)r>Z	makeSuiterrrrr�
test_suiteos
r?�__main__)r8r�importlib.utilrr>Zdistutils.command.install_librZdistutils.extensionrZdistutils.testsrZdistutils.errorsrZtest.supportrZTempdirManagerZLoggingSilencerZEnvironGuardZTestCaserr?r;rrrr�<module>s&�a�