
    ϶vg                         d Z ddlZddlZddlZddlmZ ddlmZ ddl	m
Z
 ddlmZ ddlZej        ej                            d           G d d	ej                                          ZdS )
z)Tests for distutils.command.install_data.    N)install_lib)DistutilsOptionError)	Extension)supportsave_envc                   l    e Zd Zd Zej                            d          d             Zd Zd Z	d Z
dS )TestInstallLibc                 4   |                                  d         }t          |          }|                                 |j        dk    sJ |j        dk    sJ d|_        t          j        t                    5  |                                 d d d            n# 1 swxY w Y   d|_        t          j        t                    5  |                                 d d d            n# 1 swxY w Y   d|_        |                                 |j        dk    sJ d S )N   r   foo42   )create_distr   finalize_optionscompileoptimizepytestraisesr   )selfdistcmds      i/var/www/pixelcanvas.ch/venv/lib/python3.11/site-packages/setuptools/_distutils/tests/test_install_lib.pytest_finalize_optionsz$TestInstallLib.test_finalize_options   s   !!!$${a|q     ]/00 	# 	#  """	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	#]/00 	# 	#  """	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# |q      s$   8BB BC%%C),C)zsys.dont_write_bytecodec                 @   |                                  \  }}t          j        |           t          |          }dx|_        |_        t          j                            |d          }|                     |d           |	                    |g           t          j                            dd          }t          j                            d|j                  }t          j                            |          sJ t          j                            |          sJ d S )Nr   zfoo.pyz# python file )optimization)r   oschdirr   r   r   pathjoin
write_filebyte_compile	importlibutilcache_from_sourceexists)r   project_dirr   r   fpyc_filepyc_opt_files          r   test_byte_compilez TestInstallLib.test_byte_compile'   s     ,,..T
$%&&clGLLh//?+++!>33H23NN ~773< 8 
 
 w~~h'''''w~~l+++++++    c                 *   |                                  \  }}t          j        |           t          j        d           t	          |          }dx|_        |_        |                                 |_        t          j	        
                    |dd          }|                     |d           t          ddg          g|j        _        dg|j        _        d|j        _        |                                }t%          |          dk    s
J |            d S )	Nspamr   __init__.py# python packager   xxxsetup.py   )r   r   r   mkdirr   r   r   mkdtempinstall_dirr    r!   r"   r   distributionext_modulespackagesscript_nameget_outputslen)r   r(   r   r   r)   outputss         r   test_get_outputszTestInstallLib.test_get_outputs8   s     ,,..T

$ &'&cl,,..GLLfm<<-...(1%%(A(A'B$%+H!'1$ //##7||q   '     r-   c                 *   |                                  \  }}t          j        |           t          j        d           t	          |          }dx|_        |_        |                                 |_        t          j	        
                    |dd          }|                     |d           t          ddg          g|j        _        dg|j        _        d|j        _        |                                }t%          |          dk    s
J |            d S )	Nr/   r   r0   r1   r   r2   r3   r   )r   r   r   r5   r   r   r   r6   r7   r    r!   r"   r   r8   r9   r:   r;   
get_inputsr=   )r   r(   r   r   r)   inputss         r   test_get_inputszTestInstallLib.test_get_inputsL   s     ,,..T

$ &'&cl,,..GLLfm<<-...(1%%(A(A'B$%+H!'1$ !!6{{ar-   c                 .   |                                  d         }t          |          }d|_        d|_        t          j        }dt          _        	 |                    g            |t          _        n# |t          _        w xY wd|j        d         v sJ d S )Nr   Tzbyte-compiling is disabledr   )r   r   r   r   sysdont_write_bytecoder#   messages)r   caplogr   r   old_dont_write_bytecodes        r   test_dont_write_bytecodez'TestInstallLib.test_dont_write_bytecode`   s    !!!$$"%"9"&	>R   &=C##&=C#====+vq/AAAAAAAs   A3 3BN)__name__
__module____qualname__r   r   markskipifr,   r?   rC   rJ    r-   r   r	   r	      s        
! ! !( [122, , 32, * * *(( ( ((B B B B Br-   r	   )__doc__importlib.utilr$   r   rE   distutils.command.install_libr   distutils.errorsr   distutils.extensionr   distutils.testsr   r   combine_markersrN   usefixturesTempdirManagerr	   rP   r-   r   <module>rZ      s    / /     				 



 5 5 5 5 5 5 1 1 1 1 1 1 ) ) ) ) ) ) # # # # # #  	$$^B ^B ^B ^B ^B^B ^B %$ ^B ^B ^Br-   