Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.9/distutils/tests/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.9/distutils/tests/__pycache__/test_unixccompiler.cpython-39.opt-2.pyc

a

��g�@shddlZddlZddlmZmZddlmZddlmZGdd�dej	�Z
dd�Zed	krdee��dS)
�N)�EnvironmentVarGuard�run_unittest)�	sysconfig)�
UnixCCompilerc@sjeZdZdd�Zdd�Ze�ejdkd�dd��Z	e�
ejd	kd
�dd��Ze�
ejd	kd
�d
d��ZdS)�UnixCCompilerTestCasecCs,tj|_tj|_Gdd�dt�}|�|_dS)Nc@seZdZdd�ZdS)z4UnixCCompilerTestCase.setUp.<locals>.CompilerWrappercSs
|�d�S)Nz/foo)Zruntime_library_dir_option��self�r	�>/usr/local/lib/python3.9/distutils/tests/test_unixccompiler.py�	rpath_foosz>UnixCCompilerTestCase.setUp.<locals>.CompilerWrapper.rpath_fooN)�__name__�
__module__�__qualname__rr	r	r	r
�CompilerWrappersr)�sys�platform�_backup_platformr�get_config_var�_backup_get_config_varr�cc)rrr	r	r
�setUpszUnixCCompilerTestCase.setUpcCs|jt_|jt_dS�N)rrrrrrrr	r	r
�tearDownszUnixCCompilerTestCase.tearDown�win32zcan't test on WindowscCsXdt_|�|j��d�dt_tj}dd�}|t_|�|j��ddg�dd�}|t_|�|j��ddg�d	d�}|t_|�|j��ddg�|t_d
t_dd�}|t_|�|j��d�d
t_d
d�}|t_|�|j��d�d
t_dd�}|t_|�|j��d�d
t_dd�}|t_|�|j��d�d
t_dd�}|t_|�|j��d�dS)N�darwinz-L/foozhp-uxcSsdS)NZxxxr	��vr	r	r
�gcv%sz=UnixCCompilerTestCase.test_runtime_libdir_option.<locals>.gcvz+scSsdS)N�gccr	rr	r	r
r*sz-Wl,+scSsdS)Nzg++r	rr	r	r
r/sZbarcSs|dkrdS|dkrdSdS)N�CCr�GNULD�yesr	rr	r	r
r8sz-Wl,--enable-new-dtags,-R/foocSs|dkrdS|dkrdSdS)Nrrr �nor	rr	r	r
rBsz
-Wl,-R/foocSs|dkrdS|dkrdSdS)Nrzx86_64-pc-linux-gnu-gcc-4.4.2r r!r	rr	r	r
rMscSs|dkrdS|dkrdSdS)Nrrr r!r	rr	r	r
rWsz-R/foocSs|dkrdS|dkrdSdS)Nrrr r"r	rr	r	r
ras)rr�assertEqualrrrr)rZold_gcvrr	r	r
�test_runtime_libdir_optionsDz0UnixCCompilerTestCase.test_runtime_libdir_optionrztest only relevant for OS XcCsfdd�}|t_t��*}d|d<|d=t�|j�Wd�n1sD0Y|�|jjdd�dS)NcSs|dkrdSdS�N�LDSHAREDz*gcc-4.2 -bundle -undefined dynamic_lookup zgcc-4.2r	rr	r	r
rmszAUnixCCompilerTestCase.test_osx_cc_overrides_ldshared.<locals>.gcv�my_ccrr&r�rrrZcustomize_compilerrr#Z	linker_so�rr�envr	r	r
�test_osx_cc_overrides_ldsharedis*z4UnixCCompilerTestCase.test_osx_cc_overrides_ldsharedcCshdd�}|t_t��,}d|d<d|d<t�|j�Wd�n1sF0Y|�|jjdd�dS)	NcSs|dkrdSdSr%r	rr	r	r
r}sz=UnixCCompilerTestCase.test_osx_explicit_ldshared.<locals>.gcvr'rzmy_ld -bundle -dynamicr&rZmy_ldr(r)r	r	r
�test_osx_explicit_ldsharedxs*z0UnixCCompilerTestCase.test_osx_explicit_ldsharedN)
rr
rrr�unittestZskipIfrrr$Z
skipUnlessr+r,r	r	r	r
r	s
Q
rcCs
t�t�Sr)r-Z	makeSuiterr	r	r	r
�
test_suite�sr.�__main__)
rr-Ztest.supportrrZ	distutilsrZdistutils.unixccompilerrZTestCaserr.rr	r	r	r
�<module>s

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists