o
    5‘ði¥  ã                   @   s`   d 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mZ dZ	ej
dd„ ƒZG d	d
„ d
ƒZdS )zdevelop testsé    N)ÚDistributioné   )Úcontextsz7from setuptools import setup

setup(py_modules=['hi'])
c                 c   s¦   � | d   d¡�}| t¡ W d   ƒ n1 sw   Y  | d   d¡�}| d¡ W d   ƒ n1 s4w   Y  |  ¡ � | V  W d   ƒ d S 1 sLw   Y  d S )Núsetup.pyÚwúhi.pyz1
)ÚopenÚwriteÚSETUP_PYÚas_cwd)ÚtmpdirÚf© r   ú^/root/parts/websockify/install/lib/python3.10/site-packages/setuptools/tests/test_bdist_egg.pyÚsetup_context   s   €ÿÿ
"ÿr   c                   @   sf   e Zd Zej d¡ej d¡dd„ ƒƒZejjej	 
dd¡dd�ej d¡ej d¡d	d
„ ƒƒƒZdS )ÚTestÚuser_overrider   c                 C   s„   t tddgddgd�ƒ}t tj dd¡¡ t ¡ � | ¡  | 	¡  W d   ƒ n1 s-w   Y  t 
d¡\}t d	|¡s@J ‚d S )
Nr   Ú	bdist_eggÚfooÚhi)Úscript_nameÚscript_argsÚnameÚ
py_modulesÚbuildÚsrcÚdistzfoo-0.0.0-py[23].\d+.egg$)r   ÚdictÚosÚmakedirsÚpathÚjoinr   ÚquietÚparse_command_lineÚrun_commandsÚlistdirÚreÚmatch)Úselfr   Úcontentr   r   r   Útest_bdist_egg   s   üÿ

þzTest.test_bdist_eggÚPYTHONDONTWRITEBYTECODEFzByte code disabled)Úreasonc                 C   s¤   t tdddgdgd�ƒ}t ¡ � | ¡  | ¡  W d   ƒ n1 s#w   Y  t d¡\}tj 	d|¡}t
 |¡}tdd„ |jD ƒƒ}d	|v sJJ ‚d
|vsPJ ‚d S )Nr   r   z--exclude-source-filesr   )r   r   r   r   c                 s   s   � | ]}|j V  qd S )N)Úfilename)Ú.0Úzir   r   r   Ú	<genexpr>G   s   € z1Test.test_exclude_source_files.<locals>.<genexpr>zhi.pycr   )r   r   r   r"   r#   r$   r   r%   r    r!   ÚzipfileÚZipFileÚlistÚfilelist)r(   r   Ú	dist_nameÚdist_filenameÚzipÚnamesr   r   r   Útest_exclude_source_files3   s"   ýÿ

þ
zTest.test_exclude_source_filesN)Ú__name__Ú
__module__Ú__qualname__ÚpytestÚmarkÚusefixturesr*   Úxfailr   ÚenvironÚgetr9   r   r   r   r   r      s    

þ

r   )Ú__doc__r   r&   r1   r=   Úsetuptools.distr   Ú r   r
   Úfixturer   r   r   r   r   r   Ú<module>   s    
	