
    ϶vgh
                         d Z ddlZddlZddlmZ ddlmZmZ ddlm	Z	m
Z
 ddlZddlZddlZ ej        d          d             Ze
j         G d	 d
e
j                              ZdS )z#Tests for distutils.command.config.    N)log)config	dump_file)missing_compiler_executablesupportT)autousec                 d    | j         }g |_        |                    t          d|j                   d S )Ninfo)instance_logssetattrr   _info)requestmonkeypatchselfs      h/var/www/pixelcanvas.ch/venv/lib/python3.11/site-packages/setuptools/_distutils/tests/test_config_cmd.pyinfo_logr      s1    DDJVTZ00000    c                   l    e Zd Zd Zd Zej                            d          d             Zd Z	d Z
dS )
TestConfigc                 h    |                                 D ]}| j                            |           d S )N)
splitlinesr   append)r   msgargslines       r   r   zTestConfig._info   s>    NN$$ 	$ 	$DJd####	$ 	$r   c                 <   t          j        t                                        d          }|                    d          5 }t          j        |          }d d d            n# 1 swxY w Y   t          |d           t          | j	                  |dz   k    sJ d S )Nz.pyzutf-8)encodingzI am the header   )
pathPath__file__with_suffixopenmore_itertoolsilenr   lenr   )r   	this_filefnumliness       r   test_dump_filezTestConfig.test_dump_file   s    Ih''33E::	^^W^-- 	.%*1--H	. 	. 	. 	. 	. 	. 	. 	. 	. 	. 	. 	. 	. 	. 	. 	).///4:(Q,......s   A$$A(+A(zplatform.system() == "Windows"c                    t          dg          }||                     d|d           |                                 \  }}t          |          }|                                 |j        }t          j        d d         dk    r6d|j        d         	                                v r|                     d           |
                    d	d
          }|dk    sJ |
                    dd
          }|dk    sJ d S )NpreprocessorzThe z command is not found   aixxlcr   zAxlc: The -E option overrides the -P, -o, and -qsyntaxonly optionsxxxz	/* xxx */)patternbody_configtestr   )r   skipTestcreate_distr   _check_compilercompilersysplatformr-   lower
search_cpp)r   cmdpkg_dirdistr8   matchs         r   test_search_cppzTestConfig.test_search_cpp#   s   )>*:;;?MM====>>>((**Tll<<u$$(2G2J2P2P2R2R)R)RMMS  
 u;??zzzz};GGzzzzzzr   c                 4   |                                  \  }}t          |          }dt          j         d|_        d|_        dt          j         d|_        |                                 |j        ddgk    sJ |j        dgk    sJ |j        ddgk    sJ d S )Nonetwothreefour)r6   r   ospathsepinclude_dirs	librarieslibrary_dirsensure_finalized)r   r>   r?   r=   s       r   test_finalize_optionsz TestConfig.test_finalize_options8   s     ((**Tll000032:333E5>1111}''''GV#4444444r   c                    |                                  }t          j                            |d          }t          j                            |d          }|                     |d           |                     |d           ||fD ]#}t          j                            |          sJ $|                                 \  }}t          |          }|                    ||           ||fD ]#}t          j                            |          rJ $d S )NrC   rD   r1   )	mkdtemprG   r    join
write_fileexistsr6   r   _clean)r   tmp_dirf1f2r)   r>   r?   r=   s           r   
test_cleanzTestConfig.test_cleanF   s    ,,..W\\'5))W\\'5))E"""E"""b 	% 	%A7>>!$$$$$$((**Tll

2rb 	) 	)Aw~~a((((((	) 	)r   N)__name__
__module____qualname__r   r+   pytestmarkskipifrA   rM   rW    r   r   r   r      s}        $ $ $/ / / [899  :9(5 5 5) ) ) ) )r   r   )__doc__rG   r9   distutils._logr   distutils.command.configr   r   distutils.testsr   r   r%   r    r[   fixturer   combine_markersTempdirManagerr   r^   r   r   <module>rf      s    ) ) 				 



       6 6 6 6 6 6 6 6 @ @ @ @ @ @ @ @       1 1 1 	A) A) A) A) A)' A) A) A) A) A)r   