
    Oh
                         d Z ddlZddlZddlmZ ddlmZ ddlZddlm	Z	  ej                  d      d	        Z G d
 dej                        Zy)z$Tests for distutils.cygwinccompiler.    N)	sysconfig)support   )cygwinT)autousec                    | j                   }t        j                  j                  |j	                         d      |_        |j                  t        d|j                         |j                  t        dt        j                         y )Nzpython.hget_config_h_filenameversion)instanceospathjoinmkdtemppython_hsetattrr   _get_config_h_filenamesysr
   )requestmonkeypatchdistutils_managed_tempdirselfs       /mnt/c/Users/Administrator/Desktop/help_/test_env/lib/python3.12/site-packages/setuptools/_distutils/compilers/C/tests/test_cygwin.pystuffr      sX    DGGLL<DM	#:D<W<WXY4    c                       e Zd Zd Zej
                  j                  d      ej
                  j                  d      d               Zej
                  j                  d      d        Zd Z	d Z
ej
                  j                  d      d        Zy	)
TestCygwinCCompilerc                     | j                   S N)r   r   s    r   r   z*TestCygwinCCompiler._get_config_h_filename   s    }}r   zsys.platform != "cygwin"z,not os.path.exists("/usr/lib/libbash.dll.a")c                     ddl m}  |       }d}|j                  dg|      }|J t        j                  j                  |      sJ |d|ddk(  sJ y )Nr   CygwinCCompilerbashz/usr/libz/usr/lib/libsz.dll.a)distutils.cygwinccompilerr"   find_library_filer   r   exists)r   r"   compiler	link_namelinkable_files        r   test_find_library_filez*TestCygwinCCompiler.test_find_library_file   sc     	>"$	 22J<K(((ww~~m,,,,ym6 BBBBr   c                 J    ddl m}  |       }|j                  d      g k(  sJ y )Nr   r!   z/foo)r%   r"   runtime_library_dir_optionr   r"   r(   s      r   test_runtime_library_dir_optionz3TestCygwinCCompiler.test_runtime_library_dir_option%   s&    ="$226:b@@@r   c                    dt         _        t        j                         d   t        j                  k(  sJ dt         _        t        j                         d   t        j
                  k(  sJ | j                  | j                  d       t        j                         d   t        j                  k(  sJ | j                  | j                  d       t        j                         d   t        j                  k(  sJ y )NzX2.6.1 (r261:67515, Dec  6 2008, 16:42:21) 
[GCC 4.0.1 (Apple Computer, Inc. build 5370)]r   zsomething without the *CC wordxxxzxxx __GNUC__ xxx)	r   r
   r   check_config_hCONFIG_H_OKCONFIG_H_UNCERTAIN
write_filer   CONFIG_H_NOTOKr   s    r   test_check_config_hz'TestCygwinCCompiler.test_check_config_h,   s    7 	
 $$&q)V-?-???? 7 $$&q)V-F-FFFF 	u-$$&q)V-B-BBBB 	'9:$$&q)V-?-????r   c                 6    t        j                         g k(  sJ y r   )r   	get_msvcrr   s    r   test_get_msvcrz"TestCygwinCCompiler.test_get_msvcrD   s    !R'''r   c                 :    ddl m}  |       }|j                  J y )Nr   r!   )r%   r"   dll_librariesr.   s      r   test_dll_libraries_not_nonez/TestCygwinCCompiler.test_dll_libraries_not_noneG   s    ="$%%111r   N)__name__
__module____qualname__r   pytestmarkskipifr+   r/   r7   r:   r=    r   r   r   r      s     [[23[[FGC H 4C [[23A 4A@0( [[232 42r   r   )__doc__r   r   	distutilsr   distutils.testsr   rA    r   fixturer   TempdirManagerr   rD   r   r   <module>rK      sK    * 	 
  #   5 572'00 72r   