
    ϶vg                     z    d dl Z d dlZd dlZd dlZd dlZd dlmZ d dlZd Zej	        d             Z
d Zd Zd ZdS )    N)	ccompilerc                     t           j        dk    rt          j                    dk    r| S t	          t          t          j        |                     S )z<
    Convert paths to strings for legacy compatibility.
    )      Windows)sysversion_infoplatformsystemlistmaposfspath)pathss    g/var/www/pixelcanvas.ch/venv/lib/python3.11/site-packages/setuptools/_distutils/tests/test_ccompiler.py
_make_strsr      sC     &  X_%6%6)%C%CBIu%%&&&    c                 6   | dz  }d}t          j                    dk    }d|z  }||z   }d                    d |D                       }t          j        d                                                              d|          }|                    |d	
           |S )Nzfoo.c)zPython.hr   )z	windows.h
c              3   "   K   | ]
}d | dV  dS )z
#include <z>
N ).0headers     r   	<genexpr>zc_file.<locals>.<genexpr>   s.      KKV0V000KKKKKKr   z;
        #headers
        void PyInit_foo(void) {}
        z#headerszutf-8)encoding)r
   r   jointextwrapdedentlstripreplace
write_text)tmp_pathc_filegen_headers
is_windowsplat_headersall_headersheaderspayloads           r   r#   r#      s    FK""i/J!J.L,KiiKK{KKKKKG	
 	
 
	W	%	%  g000Mr   c                 B   t          j                    }t          j                    d         }|                    |g           |                    t          | g                     |                    |g           |                    t          | 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compiler   r#   compilerpythons      r   test_set_include_dirsr4   *   s    
 %''H ""9-Fvh'''Z))*** vh'''Z))*****r   c                  h   t          j                    } |                     d          sJ |                     d          sJ t          j        d          5  |                     ddg          sJ 	 d d d            n# 1 swxY w Y   t          j        d          5  |                     ddg          rJ 	 d d d            n# 1 swxY w Y   |                     d          rJ t          j        d          5  |                     ddg          rJ 	 d d d            d S # 1 swxY w 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)r2   s    r   test_has_function_prototyper>   9   sQ    %''H   )))))  (((((		&>	?	?	? E E$$W
|$DDDDDDE E E E E E E E E E E E E E E 
	&>	?	?	? H H((:,(GGGGGGH H H H H H H H H H H H H H H $$%@AAAAA		&>	?	?	? 
 
(('9+ ) 
 
 	
 	
 	
 	

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
s6   A??BBCCC>D''D+.D+c                 N   t          j                    }t          j                    d         }|                    |g           |                    t          | g                     |j        |gk    sJ |                    t          | 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/   r0   r   include_dirsr1   s      r   .test_include_dirs_after_multiple_compile_callsrA   P   s    
 %''H ""9-Fvh'''Z))*** VH,,,,Z))*** VH,,,,,,r   )r   r
   r   r-   r   	distutilsr   r<   r   fixturer#   r4   r>   rA   r   r   r   <module>rD      s    				  



            ' ' '   *+ + +
 
 
.- - - - -r   