\bgH@UdZddlmZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddl Z ddl m Z mZmZddlmZddlmZddlmZddlmZd e jvZd Zd d d gd ZdezZejdZdZe e!egdZ"ddgddgfddggdfdddgdgfdgddgfddggfd d!gd"gfd#gd$d%gfd&d'd(gd)gfd*gd+gfd,gd-d.d/gfd0d1d2ggd3fd4gd5d6gfd7d8ggd9fg Z#d:e$d;< ej%&d<e#DZ'e j(e'=d>Z)ej%&d?e#DZ*e j(e*=d@Z+dAZ,dBZ-GdCdDZ.GdEdFe.Z/GdGdHe.Z0dS)Iz sdist tests) annotationsN)FileListegg_infotranslate_pattern) Distribution)DALS)log)DistutilsTemplateError__pypy__cB|dtjS)z"Converts '/' in a string to os.sep/)replaceossep)ss o/builddir/build/BUILD/cloudlinux-venv-1.0.7/venv/lib/python3.11/site-packages/setuptools/tests/test_manifest.pymake_local_pathrs 99S"& ! !!appz0.0)nameversionpackagesz*from setuptools import setup setup(**%r) c#(Ktjtj}}tjtjct_t_ dV||ct_t_dS#||ct_t_wxYwN)sysstdoutstderrioStringIO) old_stdout old_stderrs rquietr"/sm Z J[]]BKMMCJ 8 !+Z CJJJZ CJ7777s A66BcJt|ddS)Nwb)openclose)filenames rtouchr(9s$4     r) README.rst MANIFEST.insetup.pyzapp.egg-info/PKG-INFOzapp.egg-info/SOURCES.txtz!app.egg-info/dependency_links.txtzapp.egg-info/top_level.txtzapp/__init__.pyfoobarfoobarfoo/bar)z foo/bar/bazz ./foo/barr,z*.txtzfoo.txtzbar.txtz foo/foo.txtz dir/*.txt)z dir/foo.txtz dir/bar.txtzdir/.txtznotdir/foo.txtz*/*.pyz bin/start.pyzdocs/page-?.txtzdocs/page-9.txtzdocs/page-10.txtz foo/**/bar)z foo/bing/barzfoo/bing/bang/barr/zfoo/abarzfoo/**zfoo/bar/bing.pyzfoo/xz/foo/xz**)xzabc/xyzz@nythingz pre[one]post)preopostprenpostpreepostprepost preonepostzhello[!one]world helloxworld helloyworld) hellooworld helloworld hellooneworldz []one].txt)zo.txtz].txtze.txtzone].txtz foo[!]one]barfooybar)zfoo]barfooobarfooebarz&list[tuple[str, list[str], list[str]]]translate_specsc#bK|]*\}}}ttj||V+dSrzip itertoolsrepeat.0patternmatches mismatchess r rIsQ--$* !!7++------r)paramsc6tt|jSrmaprparamrequests r pattern_matchrQ  . ..rc#bK|]*\}}}ttj||V+dSrr@rDs rrIrIsQ00$* !!:..000000rc6tt|jSrrLrOs rpattern_mismatchrUrRrcX|\}}t||sJdSrrmatch)rQrFtargets rtest_translated_pattern_matchrZs3#OGV W % % + +F 3 333 333rcX|\}}t||rJdSrrW)rUrFrYs r test_translated_pattern_mismatchr\s3&OGV ))//7777 777rceZdZdZdZdS)TempDirTestCasectj|_tj|_tj|jdSr)tempfilemkdtemptemp_dirrgetcwdold_cwdchdirselfmethods r setup_methodzTempDirTestCase.setup_methods7 (** y{{  rcjtj|jtj|jdSr)rrerdshutilrmtreerbrfs rteardown_methodzTempDirTestCase.teardown_methods,  dm$$$$$rN)__name__ __module__ __qualname__rirmrrr^r^s2   %%%%%rr^cfeZdZfdZdZdZdZdZdZdZ dZ d Z d Z d Z d Zd ZxZS)TestManifestTestc"t|ttj|jddd}|t|  dD]4}ttj|j|5tj|jd}tj |dD]/}ttj||0tj|d}tj |d D]/}ttj||0dS) Nr+wutf-8encoding)r) .hidden.rst testing.rstLICENSEr)z __init__.pya.txtb.txtzc.rststatic)zapp.jsz app.js.mapzapp.cssz app.css.map) superrir%rpathjoinrbwriteSETUP_PYr&r(mkdir)rgrhffnametest_pkgr~ __class__s rrizTestManifestTest.setup_methodsT V$$$ dmZ88# P P P    $M 6 6E "',,t}e44 5 5 5 57<< u55 ? 1 1E "',,x// 0 0 0 0h11 G / /E "',,vu-- . . . . / /rctj|jd}t |dd5}|t |ddddS#1swxYwYdS)zWrite a MANIFEST.in.r*rurvrwN)rrrrbr%rr)rgcontentsmanifestrs r make_manifestzTestManifestTest.make_manifests7<< }== (C' 2 2 2 $a GGDNN # # # $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $s#A((A,/A,ctt}d|_t|}||t |jjS)z7Run egg_info and get all the files to include, as a setr+) r SETUP_ATTRS script_namerensure_finalizedrunsetfilelistfiles)rgdistcmds r get_fileszTestManifestTest.get_filessTK((%tnn   3<%&&&rcfttdgz |ksJdS)z=Check a missing MANIFEST.in includes only the standard files.r*N) default_filesrrrgs rtest_no_manifestz!TestManifestTest.test_no_manifests2]O 4 449I9IIIIIIIrcn|dt|ksJdS)zV>V$W X XX((((((((rc t}|dttdd|d|d|dgz}||ksJdS)z;Include all *.rst, *.js, and *.css files in the whole tree.z9 global-include *.rst *.js *.css ryrzrrrNrrs rtest_global_includez$TestManifestTest.test_global_include4s         B{OO B" # # B# $ $ % ! !  ((((((((rct}|dtt|d|d|dgz}||ksJdS)z@Include all files in app/, except for the whole app/static/ dir.z@ graft app prune app/static rrrNrrs rtest_graft_prunez!TestManifestTest.test_graft_pruneEsx      RR __bboorr+$W X XX((((((((r)rnrorprirrrrrrrrrrrr __classcell__)rs@rrsrss%/%/%/%/%/N$$$ ' ' 'JJJ111 ))) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ))))" ) ) ) ) ) ) )rrsceZdZdZejejddkdZdZ dZ dZ d Z d Z d Zd Zd ZdZdZdZdZdZdZdZdZdS)TestFileListTestz A copy of the relevant bits of distutils/tests/test_filelist.py, to ensure setuptools' version of FileList keeps parity with distutils. SETUPTOOLS_USE_DISTUTILSstdlib)autousecTfd}|tjd|dS)z Account for stdlib compatibilityc tj}tjd|dd|||}j|dS)N distutilsrr)rexc_infologging LogRecordrecordsappend)_loggerlevelmsgargsexcreccaplogs r_logz2TestFileListTest._compat_record_logs.._log\sF,..C#KAsD#NNC N ! !# & & & & &rrN)setattrr Log)rg monkeypatchrrs ` r_compat_record_logsz$TestFileListTest._compat_record_logsXs> ' ' ' ' ' CGVT22222rc*fd|jDS)Nc&g|] }|jv |Srq)levelno)rErlevelss r z0TestFileListTest.get_records..ds%AAAaQY&-@-@-@-@-@r)r)rgrrs `r get_recordszTestFileListTest.get_recordscsAAAA6>AAAArcz||tjgksJ|dSr)rr WARNclearrgrs rassertNoWarningsz!TestFileListTest.assertNoWarningsfs611R7777 rctr|jstjddSt ||t jdksJ|dS)Nz'caplog checks may not work well in PyPyr) IS_PYPYrpytestxfaillenrr rrrs rassertWarningszTestFileListTest.assertWarningsjsf  6>  LB C C C C Ct''99::Q>>>> LLNNNNNrc|D]n}tj|j|}tj|\}}tj|dt |odS)NT)exist_ok)rrrrbsplitmakedirsr()rgrfiledirname _basenames r make_fileszTestFileListTest.make_filesqsl  D7<< t44D!#t!4!4 GY K$ / / / / $KKKK   rcnt}t}|ddddd|d|d|d|d |d |d |d |d |d|dgtd}|dD]}|s||ddd|d|d |d |d |d|dg }||j|ksJdS)Nzfoo.tmpokxozfour.txtz buildout.cfgz.hg/last-message.txtzglobal/one.txtzglobal/two.txtzglobal/files.xzglobal/here.tmpzf/o/f.ooz dir/graft-onezdir/dir2/graft2zdir3/okzdir3/sub/ok.txta6 include ok include xo exclude xo include foo.tmp include buildout.cfg global-include *.x global-include *.txt global-exclude *.tmp recursive-include f *.oo recursive-exclude global *.x graft dir prune dir3  )rrrrrprocess_template_linesortr)rg file_listr MANIFEST_INlinewanteds rtest_process_template_linez+TestFileListTest.test_process_template_linexsJJ        B% & & B B B B ! ! BzNN B   B ! ! ByMM B ! !#    (   " %%d++ 2 2D   + +D 1 1 1 1    B% & & B   B ! ! BzNN B B    &((((((rcHt}|drJt}ddg|_|dsJt}ddg|_|d||jdgksJdS)N*.pya.pyzb.pyr|)rexclude_patternrrrgrs rtest_exclude_patternz%TestFileListTest.test_exclude_patternsJJ ,,V44444JJ !6* ((00000JJ !7+ !!&)))7)++++++rct}|g|drJt}|ddg|dsJt}|ddg|d||jddgksJdS)Nrrr}*)rrinclude_patternrrrs rtest_include_patternz%TestFileListTest.test_include_patternsJJ  ,,V44444JJ  )***((00000JJ  )***!!#&&&67"3333333rct}dD]H}tjt5||dddn #1swxYwYIdS)N) includeexcludezglobal-includezglobal-excludezrecursive-includezrecursive-excludegraftpruneblarg)rrraisesr r)rgractions r"test_process_template_line_invalidz3TestFileListTest.test_process_template_line_invalidsJJ   8 8F566 8 8//777 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8sAA A c|tjt}t }|dd|dg|d||jdgksJ| ||d||jdgksJ| |dS)Nrr}d/c.pyz include *.pyz include *.rb set_levelrDEBUGrrrrrrrrrgrrrs rrzTestFileListTest.test_includes''' JJ  ""X,,7888''7776(**** f%%%''7776(**** F#####rc|tjt}t }dd|dg|_|d||jd|dgksJ|||d||jd|dgksJ| |dS)Nrr}r z exclude *.pyz exclude *.rb rrrrrrrrrrrs rrzTestFileListTest.test_excludes''' JJ !7BBxLL9 ''7777BBxLL"99999 f%%%''7777BBxLL"99999 F#####rc|tjt}t }|dd|dg|d||jd|dgksJ| ||d||jd|dgksJ| |dS)Nrr}r zglobal-include *.pyzglobal-include *.rbrrs rrz$TestFileListTest.test_global_include s''' JJ  ""X,,7888''(=>>>622h<<"88888 f%%%''(=>>>622h<<"88888 F#####rc|tjt}t }dd|dg|_|d||jdgksJ|||d||jdgksJ| |dS)Nrr}r zglobal-exclude *.pyzglobal-exclude *.rbrrs rtest_global_excludez$TestFileListTest.test_global_excludes''' JJ !7BBxLL9 ''(=>>>7)++++ f%%%''(=>>>7)++++ F#####rcR|tjt}t }|d|d|d|dg|d||j|d|dgksJ| ||d||j|d|dgksJ| |dS)Nrd/b.pyd/c.txtd/d/e.pyzrecursive-include d *.pyzrecursive-include e *.pyrrs rtest_recursive_includez'TestFileListTest.test_recursive_include/s!''' JJ  Hrr)}}bbnnMNNN''(BCCC22h<<J"@@@@@ f%%%''(BCCC22h<<J"@@@@@ F#####rc|tjt}t }d|d|d|dg|_|d||jd|dgksJ|||d||jd|dgksJ| |dS)Nrrrrzrecursive-exclude d *.pyzrecursive-exclude e *.pyrrs rtest_recursive_excludez'TestFileListTest.test_recursive_exclude@s''' JJ !22h<<I:O ''(BCCC622i=="99999 f%%%''(BCCC622i=="99999 F#####rcR|tjt}t }|d|d|d|dg|d||j|d|dgksJ| ||d||j|d|dgksJ| |dS)Nrrrf/f.pyzgraft dzgraft errs rrzTestFileListTest.test_graftQs''' JJ  Hrr*~~rr(||LMMM'' 22222h<<J"@@@@@ f%%%'' 22222h<<J"@@@@@ F#####rc|tjt}t }d|d|d|dg|_|d||jd|dgksJ|||d||jd|dgksJ| |dS)Nrrrrzprune dzprune errs r test_prunezTestFileListTest.test_prunebs''' JJ !22h<<JHN '' 222622h<<"88888 f%%%'' 222622h<<"88888 F#####rN)rnrorp__doc__rfixturergetenvrrrrrrrrr rrrrrrrr!rqrrrrRsP V^IBI&@AAXMNNN33ON3BBB=)=)=)~,,,"444$888"$$$"$$$"$$$"$$$"$$$"$$$"$$$"$$$$$rr)1r" __future__r contextlibrrBrrrkrr`rsetuptools.command.egg_inforrrsetuptools.distrsetuptools.tests.textwraprrr distutils.errorsr builtin_module_namesrrrrcontextmanagerr"r( frozensetrMrr>__annotations__chain from_iterable match_paramsr#rQmismatch_paramsrUrZr\r^rsrrqrrr3s7""""""   MMMMMMMMMM((((((******333333 0 0"""      888!!!  C    $ UGeX&' @@@A y)$}o6<<PQ $*+.@-AB 888    G$   $$$  ,,, L!   &666 ###     )))Q-;----\ ,,--(7--- |$$$//%$////00(7000 '''//('/444 888 %%%%%%%%a)a)a)a)a)a)a)a)H_$_$_$_$_$_$_$_$_$_$r