a  zeY @sddlZddlZddlZddlZddlmZddlmZddlm Z ddl m Z dZ zddl Z dZWneyzdZYn0Gd d d e je je jejZd d Zed kreedS)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') TFcs<eZdZfddZfddZeedddZZ S)BuildDumbTestCasecs2tt|t|_tjtjddf|_dSN) superrsetUposgetcwd old_locationsysargv old_sys_argvself __class__S/opt/bitninja-python-dojo/embedded/lib/python3.9/distutils/tests/test_bdist_dumb.pyr "s zBuildDumbTestCase.setUpcs>t|j|jdt_|jdtjdd<tt|dS)Nr) r chdirr rr rrrtearDownrrrrr's  zBuildDumbTestCase.tearDownzNeed zlib support to runc Csr|}tj|d}t|||dft||dfd||dfd||dfdtdd dgd d d d }d|_t |dgt _ t |}d |_ ||ttj|d }d||jf}|||gttjd |}z|}W|n |0ttdttjj|}dt jdddg} t js^| dt jj ||t| dS)NZfoozsetup.pyzfoo.py#z MANIFEST.inzinclude foo.pyZREADMEz0.1Zxxx)nameversionZ py_modulesurlZauthorZ author_emailzipdistz %s.%s.zipzfoo-0.1-py%s.%s.egg-infoz foo.%s.pyc)!mkdtempr pathjoinmkdirZ write_fileSETUP_PYrZ script_namerr rrformatZensure_finalizedrunlistdirZ get_fullnameZ plat_nameZ assertEqualzipfileZipFileZnamelistclosesortedfiltermapbasename version_infodont_write_bytecodeappendimplementation cache_tag) rZtmp_dirZpkg_dirrcmdZ dist_createdbasefpcontentsZwantedrrrtest_simple_built-s>   z#BuildDumbTestCase.test_simple_built) __name__ __module__ __qualname__r runittestZ skipUnless ZLIB_SUPPORTr9 __classcell__rrrrrs   rcCs ttSr)r=Z makeSuiterrrrr test_suite]sr@__main__)r r r)r=Z test.supportrZdistutils.corerZdistutils.command.bdist_dumbrZdistutils.testsrr%zlibr> ImportErrorZTempdirManagerZLoggingSilencerZ EnvironGuardZTestCaserr@r:rrrrs*       @