o
    !g
                     @   sb   d dl Z d dlZd dlZd dlZddlmZ ejdZej	dd Z
dd Zd	d
 Zdd ZdS )    N   )basesuppress_path_manglec                 C   sd   | d }d}t  dk}d| }|| }ddd |D }td d	|}|j|d
d |S )Nzfoo.c)zPython.hWindows)z	windows.h
c                 s   s    | ]	}d | dV  qdS )z
#include <z>
N ).0headerr   r   p/root/parts/websockify/install/lib/python3.10/site-packages/setuptools/_distutils/compilers/C/tests/test_base.py	<genexpr>   s    zc_file.<locals>.<genexpr>z;
        #headers
        void PyInit_foo(void) {}
        z#headerszutf-8)encoding)platformsystemjointextwrapdedentlstripreplace
write_text)tmp_pathc_filegen_headers
is_windowsplat_headersall_headersheaderspayloadr   r   r
   r      s   
r   c                 C   sH   t  }t d }||g || g ||g || g dS )z
    Extensions should build even if set_include_dirs is invoked.
    In particular, compiler-specific paths should not be overridden.
    includeN)r   new_compiler	sysconfig	get_pathsset_include_dirscompiler   compilerpythonr   r   r
   test_set_include_dirs"   s   r&   c                  C   s   t  } | dsJ | dsJ tjdd | jddgds#J W d    n1 s-w   Y  tjdd | jddgdrCJ W d    n1 sMw   Y  | drYJ tjdd | jddgdrjJ W d    d S 1 suw   Y  d S )	Nabortexitzincludes is deprecated)matchzstdlib.h)includessetuptools_does_not_existzstdio.h)r   r   has_functionpytestdeprecated_call)r$   r   r   r
   test_has_function_prototype1   s   "r/   c                 C   s\   t  }t d }||g || g |j|gksJ || g |j|gks,J dS )z}
    Calling compile multiple times should not change the include dirs
    (regression test for setuptools issue #3591).
    r   N)r   r   r   r    r!   r"   include_dirsr#   r   r   r
   .test_include_dirs_after_multiple_compile_callsH   s   r1   )r   r   r   r-    r   markusefixtures
pytestmarkfixturer   r&   r/   r1   r   r   r   r
   <module>   s    
