ruạṛ
a �u:j7 � @ s� d dl Z d dlZd dlZd dlZd dlmZ d dlmZ d dlm Z d dl mZ d dlZddl mZ ej�d�ZG dd � d e j�ZG d d� dej�ZG dd � d �ZdS )� N)�DistutilsPlatformError)�support)�get_platform� )�msvcznot hasattr(msvc, "winreg")c @ sx e Zd Zdd� Zejje�� � d� dd�ej� dddd e� fg�d d� ��Zedd � �Z eej� dd�dd� ��Zd S )�Testmsvccompilerc C sN dd� }|� td|� t�t�� t�d� W d � n1 s@0 Y d S )Nc S s dS )N)NN� )Z plat_specr r �d/opt/bart/bart_venv/lib/python3.9/site-packages/setuptools/_distutils/compilers/C/tests/test_msvc.py�_find_vcvarsall s z:Testmsvccompiler.test_no_compiler.<locals>._find_vcvarsallr zwont find this version)�setattrr �pytestZraisesr �_get_vc_env)�self�monkeypatchr r r r �test_no_compiler s �z!Testmsvccompiler.test_no_compiler�winz-Only run test for non-mingw Windows platforms)�reasonzplat_name, expected)� win-arm64r )� win-amd64r Nc s0 t �� }� fdd�}|�t d|� |�|� dS )zS Ensure a specified target platform is passed to _get_vcvars_spec. c s |� ksJ �d S �Nr )Z host_platform�platform��expectedr r �_get_vcvars_spec2 s zPTestmsvccompiler.test_cross_platform_compilation_paths.<locals>._get_vcvars_specr N)r �Compilerr Z initialize)r r � plat_namer �compilerr r r r �%test_cross_platform_compilation_paths s z6Testmsvccompiler.test_cross_platform_compilation_pathsc C s� d}d}t j�dd �}|t j|<