Your IP : 216.73.216.213


Current Path : /opt/alt/python37/lib64/python3.7/distutils/tests/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib64/python3.7/distutils/tests/__pycache__/test_unixccompiler.cpython-37.pyc

B

� f�@sldZddlZddlZddlmZmZddlmZddlm	Z	Gdd�dej
�Zdd	�Ze
d
krhee��dS)z"Tests for distutils.unixccompiler.�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�G/opt/alt/python37/lib64/python3.7/distutils/tests/test_unixccompiler.py�	rpath_foosz>UnixCCompilerTestCase.setUp.<locals>.CompilerWrapper.rpath_fooN)�__name__�
__module__�__qualname__r
rrrr	�CompilerWrappersr)�sys�platform�_backup_platformr�get_config_var�_backup_get_config_varr�cc)rrrrr	�setUpszUnixCCompilerTestCase.setUpcCs|jt_|jt_dS)N)rrrrrr)rrrr	�tearDownszUnixCCompilerTestCase.tearDownZwin32zcan'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)�vrrr	�gcv%sz=UnixCCompilerTestCase.test_runtime_libdir_option.<locals>.gcvz+scSsdS)N�gccr)rrrr	r*sz-Wl,+scSsdS)Nzg++r)rrrr	r/sZbarcSs|dkrdS|dkrdSdS)N�CCr�GNULD�yesr)rrrr	r8sz-Wl,--enable-new-dtags,-R/foocSs|dkrdS|dkrdSdS)Nrrr�nor)rrrr	rBsz
-Wl,-R/foocSs|dkrdS|dkrdSdS)Nrzx86_64-pc-linux-gnu-gcc-4.4.2rrr)rrrr	rMscSs|dkrdS|dkrdSdS)Nrrrrr)rrrr	rWsz-R/foocSs|dkrdS|dkrdSdS)Nrrrrr)rrrr	ras)rr�assertEqualrr
rr)rZold_gcvrrrr	�test_runtime_libdir_optionsDz0UnixCCompilerTestCase.test_runtime_libdir_optionrztest only relevant for OS Xc	CsRdd�}|t_t�� }d|d<|d=t�|j�WdQRX|�|jjdd�dS)NcSs|dkrdSdS)N�LDSHAREDz*gcc-4.2 -bundle -undefined dynamic_lookup zgcc-4.2r)rrrr	rmszAUnixCCompilerTestCase.test_osx_cc_overrides_ldshared.<locals>.gcv�my_ccrr!r)rrr�customize_compilerrr�	linker_so)rr�envrrr	�test_osx_cc_overrides_ldsharedisz4UnixCCompilerTestCase.test_osx_cc_overrides_ldsharedc	CsTdd�}|t_t��"}d|d<d|d<t�|j�WdQRX|�|jjdd�dS)	NcSs|dkrdSdS)Nr!z*gcc-4.2 -bundle -undefined dynamic_lookup zgcc-4.2r)rrrr	r}sz=UnixCCompilerTestCase.test_osx_explicit_ldshared.<locals>.gcvr"rzmy_ld -bundle -dynamicr!rZmy_ld)rrrr#rrr$)rrr%rrr	�test_osx_explicit_ldsharedxsz0UnixCCompilerTestCase.test_osx_explicit_ldsharedN)
rrr
rr�unittestZskipIfrrr Z
skipUnlessr&r'rrrr	r	s
RrcCs
t�t�S)N)r(Z	makeSuiterrrrr	�
test_suite�sr)�__main__)�__doc__rr(Ztest.supportrrZ	distutilsrZdistutils.unixccompilerrZTestCaserr)rrrrr	�<module>s