Sindbad~EG File Manager
�
SԚgd � � � d Z ddlZddlZddlmZ ddlmZ ddlmZ G d� dej � � Z
edk r ej � � dS dS ) z"Tests for distutils.unixccompiler.� N)�EnvironmentVarGuard)� sysconfig)�
UnixCCompilerc �� � e Zd Zd� Zd� Z ej ej dk d� � d� � � Z ej
ej dk d� � d� � � Z ej
ej dk d� � d � � � Zd
S )�UnixCCompilerTestCasec �� � t j | _ t j | _ t
t j � � | _ G d� dt � � } |� � | _
d S )Nc � � e Zd Zd� ZdS )�4UnixCCompilerTestCase.setUp.<locals>.CompilerWrapperc �, � | � d� � S )Nz/foo)�runtime_library_dir_option��selfs �?/usr/local/lib/python3.11/distutils/tests/test_unixccompiler.py� rpath_fooz>UnixCCompilerTestCase.setUp.<locals>.CompilerWrapper.rpath_foo s � ��6�6�v�>�>�>� N)�__name__�
__module__�__qualname__r � r r �CompilerWrapperr
s# � � � � � �
?�
?�
?�
?�
?r r )�sys�platform�_backup_platformr �get_config_var�_backup_get_config_var�dict�_config_vars�_backup_config_varsr �cc)r r s r �setUpzUnixCCompilerTestCase.setUp si � � #����&/�&>��#�#'� �(>�#?�#?�� � ?� ?� ?� ?� ?�m� ?� ?� ?� "�/�#�#����r c �� � | j t _ | j t _ t j � � � t j � | j � � d S )N)
r r r r r r r �clear�updater r
s r �tearDownzUnixCCompilerTestCase.tearDown sL � ��,���#'�#>� � ���$�$�&�&�&���%�%�d�&>�?�?�?�?�?r �win32zcan't test on Windowsc � � dt _ | � | j � � � d� � dt _ t
j }d� }|t
_ | � | j � � � ddg� � d� }|t
_ | � | j � � � ddg� � d� }|t
_ | � | j � � � ddg� � |t
_ d t _ d
� }|t
_ | � | j � � � d� � d t _ d� }|t
_ | � | j � � � d
� � d t _ d� }|t
_ | � | j � � � d� � d t _ d� }|t
_ | � | j � � � d� � d t _ d� }|t
_ | � | j � � � d� � d S )N�darwinz-L/foozhp-uxc � � dS )N�xxxr ��vs r �gcvz=UnixCCompilerTestCase.test_runtime_libdir_option.<locals>.gcv( � � ��5r z+sc � � dS )N�gccr r* s r r, z=UnixCCompilerTestCase.test_runtime_libdir_option.<locals>.gcv- r- r z-Wl,+sc � � dS )Nzg++r r* s r r, z=UnixCCompilerTestCase.test_runtime_libdir_option.<locals>.gcv2 r- r �barc �&