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.7/distutils/tests/__pycache__/test_build_clib.cpython-37.opt-1.pyc
B

!��gC�@s�dZddlZddlZddlZddlmZmZddlmZddl	m
Z
ddlmZddl
mZGdd	�d	ejejej�Zd
d�Zedkr�ee��dS)
z'Tests for distutils.command.build_clib.�N)�run_unittest�missing_compiler_executable)�
build_clib)�DistutilsSetupError)�support)�find_executablec@sFeZdZdd�Zdd�Zdd�Zdd�Ze�e	j
d	kd
�dd��Zd
S)�BuildCLibTestCasecCs�|��\}}t|�}|�t|jd�|�t|jddg�|�t|jddg�|�t|jddg�|�t|jdifd	g�difdd
difg}|�|�dS)N�foo�foo1�foo2)�r
)�namer)r
r
)zanother/namerr
)Zanotherr�okZgood)�create_distr�assertRaisesrZcheck_library_list)�self�pkg_dir�dist�cmdZlibs�r�;/usr/local/lib/python3.7/distutils/tests/test_build_clib.py�test_check_library_dists





z)BuildCLibTestCase.test_check_library_distcCs�|��\}}t|�}difg|_|�t|j�dddifg|_|�t|j�ddddgifg|_|�|��ddg�dddifg|_|�|��ddg�dddifdddd	gifg|_|�|��dddd	g�dS)
Nr
�sourcesr�a�b)rrZname2�c�d)rr�	librariesrrZget_source_files�assertEqual)rrrrrrr�test_get_source_files/s
z'BuildCLibTestCase.test_get_source_filescCs�|��\}}t|�}Gdd�d�}|�|_dddifg}|�t|j|�ddt�ifg}|�|�ddt�ifg}|�|�dS)Nc@seZdZdd�ZeZdS)z<BuildCLibTestCase.test_build_libraries.<locals>.FakeCompilerc_sdS)Nr)�args�kwrrr�compileJszDBuildCLibTestCase.test_build_libraries.<locals>.FakeCompiler.compileN)�__name__�
__module__�__qualname__r"Zcreate_static_librrrr�FakeCompilerIsr&r
rZnotvalid)rrZcompilerrrZbuild_libraries�list�tuple)rrrrr&�librrr�test_build_librariesEs
z&BuildCLibTestCase.test_build_librariescCsh|��\}}t|�}d|_|��|�|jdg�d|_|��|�|jg�d|j_|�t|j�dS)Nzone-dirZWONTWORK)	rrZinclude_dirsZfinalize_optionsrZdistributionrrr)rrrrrrr�test_finalize_optionsZsz'BuildCLibTestCase.test_finalize_options�win32zcan't test on WindowscCs�|��\}}t|�}tj�|d�}|�|d�dd|gifg|_tj�|d�}t�|�||_||_t	�}|dk	r�|�
d|�|��|�dt�
|��dS)Nzfoo.czint main(void) { return 1;}
r	rZbuildzThe %r command is not foundzlibfoo.a)rr�os�path�joinZ
write_filer�mkdir�
build_temprZskipTest�runZassertIn�listdir)rrrrZfoo_cr1Zccmdrrr�test_runis
zBuildCLibTestCase.test_runN)r#r$r%rrr*r+�unittestZskipIf�sys�platformr4rrrrr
s
rcCs
t�t�S)N)r5Z	makeSuiterrrrr�
test_suite�sr8�__main__)�__doc__r5r-r6Ztest.supportrrZdistutils.command.build_clibrZdistutils.errorsrZdistutils.testsrZdistutils.spawnrZTempdirManagerZLoggingSilencerZTestCaserr8r#rrrr�<module>st