
    ;er                        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dl	m
Z
 ddlmZ dZ	 ddlZdZn# e$ r d	ZY nw xY w G d
 dej        ej        ej        ej                  Zd Zedk    r e e                       dS dS )z'Tests for distutils.command.bdist_dumb.    N)run_unittest)Distribution)
bdist_dumb)supportzfrom distutils.core import setup
import foo

setup(name='foo', version='0.1', py_modules=['foo'],
      url='xxx', author='xxx', author_email='xxx')

TFc                   \     e Zd Z fdZ fdZ ej        ed          d             Z xZ	S )BuildDumbTestCasec                     t          t          |                                            t          j                    | _        t          j        t          j        d d          f| _        d S N)	superr   setUposgetcwdold_locationsysargvold_sys_argvself	__class__s    6/usr/lib/python3.11/distutils/tests/test_bdist_dumb.pyr   zBuildDumbTestCase.setUp"   sM    &&,,...IKKHchqqqk1    c                     t          j        | j                   | j        d         t          _        | j        d         t          j        d d <   t          t          |                                            d S )Nr      )	r   chdirr   r   r   r   r   r   tearDownr   s    r   r   zBuildDumbTestCase.tearDown'   s_    
"###$Q''*&&//11111r   zNeed zlib support to runc           	      f   |                                  }t          j                            |d          }t          j        |           |                     |dft                     |                     |dfd           |                     |dfd           |                     |dfd           t          dd	dgd
d
d
d          }d|_        t          j	        |           dgt          _        t          |          }d|_        |                                 |                                 t          j        t          j                            |d                    }|                                d|j        d}|                     ||g           t)          j        t          j                            d|                    }	 |                                }|                                 n# |                                 w xY wt1          t3          d t5          t          j        j        |                              }dt          j        d d         z  dg}	t          j        s'|	                    dt          j        j         z             |                     |t1          |	                     d S )Nfoozsetup.pyzfoo.py#zMANIFEST.inzinclude foo.pyREADME z0.1xxx)nameversion
py_modulesurlauthorauthor_emailzipdist.z.zipzfoo-0.1-py%s.%s.egg-info   z
foo.%s.pyc)!mkdtempr   pathjoinmkdir
write_fileSETUP_PYr   script_namer   r   r   r   formatensure_finalizedrunlistdirget_fullname	plat_nameassertEqualzipfileZipFilenamelistclosesortedfiltermapbasenameversion_infodont_write_bytecodeappendimplementation	cache_tag)
r   tmp_dirpkg_dirr)   cmddist_createdbasefpcontentswanteds
             r   test_simple_builtz#BuildDumbTestCase.test_simple_built-   sX    ,,..',,w..
*-x888(+S111-02BCCC(+R000Uu,17$)U-24 4 5 5 &
< 
			 z"',,w"?"?@@"//11113===Av... _RW\\&$7788	{{}}HHHJJJJBHHJJJJ&s27+;X'F'FGGHH,s/?/CCXN& 	GMM,);)EEFFF6&>>22222s   G/ /H)
__name__
__module____qualname__r   r   unittest
skipUnlessZLIB_SUPPORTrO   __classcell__)r   s   @r   r   r      s~        
2 2 2 2 2
2 2 2 2 2 X'ABB-3 -3 CB-3 -3 -3 -3 -3r   r   c                  X    t          j                                        t                    S r
   )rS   
TestLoaderloadTestsFromTestCaser    r   r   
test_suiter[   ]   s       667HIIIr   __main__)__doc__r   r   r:   rS   test.supportr   distutils.corer   distutils.command.bdist_dumbr   distutils.testsr   r1   zlibrU   ImportErrorTempdirManagerLoggingSilencerEnvironGuardTestCaser   r[   rP   rZ   r   r   <module>rh      s:   - - 				 



   % % % % % % ' ' ' ' ' ' 3 3 3 3 3 3 # # # # # #KKKLL   LLL>3 >3 >3 >3 >3./, )>3 >3 >3@J J J zL s   5 ??