ruạṛ
a �u:jl � @ sR d dl mZ d dlmZ d dlmZmZ d dlZddlm Z m Z G dd� d�ZdS ) � )� sysconfig)�DistutilsPlatformError)�is_mingw�split_quotedN� )�cygwin�errorsc @ s� e Zd Zejje� dd�dd� �Zejje� dd�dd� �Zejje� dd�dd� �Z ejje� dd�d d � �Z ej�d�dd � �ZdS )�TestMinGW32Compilerznot on mingw)�reasonc C s t �� }|jdksJ �d S )NZmingw32)r �MinGW32Compiler� compiler_type��self�compiler� r �e/opt/bart/bart_venv/lib/python3.9/site-packages/setuptools/_distutils/compilers/C/tests/test_mingw.py�test_compiler_type s z&TestMinGW32Compiler.test_compiler_typec C s~ |� dd� |� dd� t�� }|jtd�ks2J �|jtd�ksDJ �|jtd�ksVJ �|jtd�kshJ �|jtd�kszJ �d S ) N�CC�cc�CXXzc++zcc -O -Wallzcc -shared -O -Wallzc++ -O -Wallz cc -shared) Zsetenvr r r r �compiler_so�compiler_cxx� linker_exe� linker_so)r �monkeypatchr r r r �test_set_executables s z(TestMinGW32Compiler.test_set_executablesc C s@ t �� }t�t�� |�d� W d � n1 s20 Y d S )Nz/usr/lib)r r �pytest�raisesr Zruntime_library_dir_optionr r r r �test_runtime_library_dir_option s z3TestMinGW32Compiler.test_runtime_library_dir_optionc C sJ |� tddd� � t�tj�� t�� W d � n1 s<0 Y d S )NZis_cygwinccc S s dS )NTr )�_r r r �<lambda>% � z9TestMinGW32Compiler.test_cygwincc_error.<locals>.<lambda>)�setattrr r r r �Errorr )r r r r r �test_cygwincc_error# s z'TestMinGW32Compiler.test_cygwincc_errorzsys.platform == "cygwin"c C s t �� }t�|� d S )N)r r r �customize_compilerr r r r �(test_customize_compiler_with_msvc_python* s z<TestMinGW32Compiler.test_customize_compiler_with_msvc_pythonN)�__name__� __module__�__qualname__r �markZskipifr r r r r$ r&