a
    iÝEbI  ã                   @   sN   d dl Z d dlZd dlZd dlZd dlmZ ejjejdkdd�dd„ ƒZ	dS )é    N)Úmingw32ccompilerÚwin32zwin32 only test)Úreasonc               
   C   sÒ   zt  ddg¡} W n ty.   t d¡ Y n0 | |  d¡d… }tjdk rbd|vrvtd| ƒ‚nd	|vrvtd
| ƒ‚t	 
¡ \}}|r–t ||d ¡ z t	 ¡  W |rÎt |d |¡ n|rÌt |d |¡ 0 dS )zmTest the mingw32ccompiler.build_import_library, which builds a
    `python.a` from the MSVC `python.lib`
    znm.exez--helpz)'nm.exe' not on path, is mingw installed?s   supported targets:Nl        s   pe-i386zd'nm.exe' found but it does not support 32-bit dlls when using 32-bit python. Supported formats: '%s's	   pe-x86-64zd'nm.exe' found but it does not support 64-bit dlls when using 64-bit python. Supported formats: '%s'z.bak)Ú
subprocessÚcheck_outputÚFileNotFoundErrorÚpytestÚskipÚfindÚsysÚmaxsizeÚ
ValueErrorr   Z_check_for_import_libÚshutilÚmoveZbuild_import_library)ÚoutÚ	supportedZhas_import_libÚfullpath© r   úk/home/ja/django-apps/lartica_env/lib/python3.9/site-packages/numpy/distutils/tests/test_mingw32ccompiler.pyÚtest_build_import	   s.    
þþ
ÿr   )
r   r   r   r   Znumpy.distutilsr   ÚmarkZskipifÚplatformr   r   r   r   r   Ú<module>   s   