
    wg                     L    d dl mZ d dlmZmZ d dlmZmZ d dlZ G d d      Z	y)    )	sysconfig)CCompilerErrorDistutilsPlatformError)is_mingwsplit_quotedNc                      e Zd Zej                  j                   e        d      d        Zej                  j                   e        d      d        Zej                  j                   e        d      d        Z	ej                  j                   e        d      d        Z
ej                  j                  d      d        Zy	)
TestMingw32CCompilerznot on mingw)reasonc                 @    ddl m}  |       }|j                  dk(  sJ y )Nr   Mingw32CCompilermingw32)distutils.cygwinccompilerr   compiler_typeselfr   compilers      t/home/mcse/projects/flask/flask-venv/lib/python3.12/site-packages/setuptools/_distutils/tests/test_mingwccompiler.pytest_compiler_typez'TestMingw32CCompiler.test_compiler_type	   s!    >#%%%222    c                 j   ddl m} |j                  dd       |j                  dd        |       }|j                  t	        d      k(  sJ |j
                  t	        d      k(  sJ |j                  t	        d	      k(  sJ |j                  t	        d      k(  sJ |j                  t	        d
      k(  sJ y )Nr   r   CCccCXXzc++zcc -O -Wallzcc -shared -O -Wallzc++ -O -Wallz
cc -shared)	r   r   setenvr   r   compiler_socompiler_cxx
linker_exe	linker_so)r   monkeypatchr   r   s       r   test_set_executablesz)TestMingw32CCompiler.test_set_executables   s    >4&5%(#%  L$????##|4I'JJJJ$$^(DDDD""l4&8888!!\,%????r   c                     ddl m}  |       }t        j                  t              5  |j                  d       d d d        y # 1 sw Y   y xY w)Nr   r   z/usr/lib)r   r   pytestraisesr   runtime_library_dir_optionr   s      r   test_runtime_library_dir_optionz4TestMingw32CCompiler.test_runtime_library_dir_option   s=    >#%]]12 	<//
;	< 	< 	<s   AAc                     dd l }|j                  |j                  dd        t        j                  t
              5  |j                  j                          d d d        y # 1 sw Y   y xY w)Nr   is_cygwinccc                      y)NT )_s    r   <lambda>z:TestMingw32CCompiler.test_cygwincc_error.<locals>.<lambda>+   s    r   )r   setattrcygwinccompilerr#   r$   r   r   )r   r    	distutilss      r   test_cygwincc_errorz(TestMingw32CCompiler.test_cygwincc_error'   sP    (I55}nU]]>* 	9%%668	9 	9 	9s   A  A)zsys.platform == "cygwin"c                 H    ddl m}  |       }t        j                  |       y )Nr   r   )r   r   r   customize_compilerr   s      r   (test_customize_compiler_with_msvc_pythonz=TestMingw32CCompiler.test_customize_compiler_with_msvc_python0   s    >
 $%$$X.r   N)__name__
__module____qualname__r#   markskipifr   r   r!   r&   r0   r3   r*   r   r   r	   r	      s    [[HJ~>3 ?3 [[HJ~>@ ?@ [[HJ~>< ?< [[HJ~>9 ?9 [[23/ 4/r   r	   )
r/   r   distutils.errorsr   r   distutils.utilr   r   r#   r	   r*   r   r   <module>r;      s     C 1 0/ 0/r   