K iH$UdZddlmZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddl Z ddl m Z mZmZddlmZddlmZddlmZddlmZd e j0vZd Zd d d gd ZdedZej:dZdZe e!egdZ"ddgddgfddggdfdddgdgfdgddgfdd ggfd!d"gd#gfd$gd%d&gfd'd(d)gd*gfd+gd,gfd-gd.d/d0gfd1d2d3ggd4fd5gd6d7gfd8d9ggd:fg Z#d;e$d<< ejJjMd=e#DZ'e jPe'>d?Z)ejJjMd@e#DZ*e jPe*>dAZ+dBZ,dCZ-GdDdEZ.GdFdGe.Z/GdHdIe.Z0y)Jz sdist tests) annotationsN)FileListegg_infotranslate_pattern) Distribution)DALS)log)DistutilsTemplateError__pypy__cB|jdtjS)z"Converts '/' in a string to os.sep/)replaceossep)ss d/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/setuptools/tests/test_manifest.pymake_local_pathrs 99S"&& !!appz0.0)nameversionpackagesz&from setuptools import setup setup(**z) c#2Ktjtj}}tjtjct_t_ d||ct_t_y#||ct_t_wxYwwN)sysstdoutstderrioStringIO) old_stdout old_stderrs rquietr",s[ ZZ J[[]BKKMCJ 8 !+Z CJZ CJsABA;#B;BBc8t|djy)Nwb)openclose)filenames rtouchr(6s4 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||)ywrzip itertoolsrepeat.0patternmatches mismatchess r rIs0-$* !7+--/)paramsc6tt|jSrmaprparamrequests r pattern_matchrR  ..rc#bK|]'\}}}ttj||)ywrr@rDs rrIrIs00$* !:.0rJc6tt|jSrrMrPs rpattern_mismatchrVrSrcF|\}}t|j|sJyrrmatch)rRrFtargets rtest_translated_pattern_matchr[s$#OGV W % + +F 33 3rcF|\}}t|j|rJyrrX)rVrFrZs r test_translated_pattern_mismatchr]s'&OGV )//77 77rceZdZdZdZy)TempDirTestCasectj|_tj|_tj |jyr)tempfilemkdtemptemp_dirrgetcwdold_cwdchdirselfmethods r setup_methodzTempDirTestCase.setup_methods/ ((* yy{  rctj|jtj|j yr)rrfreshutilrmtreercrgs rteardown_methodzTempDirTestCase.teardown_methods"  dmm$rN)__name__ __module__ __qualname__rjrnrrr_r_s  %rr_cfeZdZfdZdZdZdZdZdZdZ dZ d Z d Z d Z d Zd ZxZS)TestManifestTestct||ttjj |j ddd}|jt|j dD]5}ttjj |j |7tjj |j d}tj|dD]+}ttjj ||-tjj |d}tj|d D]+}ttjj ||-y) Nr+wutf-8encoding)r) .hidden.rst testing.rstLICENSEr)z __init__.pya.txtb.txtzc.rststatic)zapp.jsz app.js.mapzapp.cssz app.css.map) superrjr%rpathjoinrcwriteSETUP_PYr&r(mkdir)rhriffnametest_pkgr __class__s rrjzTestManifestTest.setup_methods  V$ dmmZ8# P    $M 6E "'',,t}}e4 5 677<< u5 ? 1E "'',,x/ 0 1h1 G /E "'',,vu- . /rctjj|jd}t |dd5}|j t |dddy#1swYyxYw)zWrite a MANIFEST.in.r*rvrwrxN)rrrrcr%rr)rhcontentsmanifestrs r make_manifestzTestManifestTest.make_manifestsM77<< }= (C' 2 $a GGDN # $ $ $s AA&ctt}d|_t|}|j |j t |jjS)z7Run egg_info and get all the files to include, as a setr+) r SETUP_ATTRS script_namerensure_finalizedrunsetfilelistfiles)rhdistcmds r get_fileszTestManifestTest.get_filessGK(%tn   3<<%%&&rcPttdgz |jk(sJy)z=Check a missing MANIFEST.in includes only the standard files.r*N) default_filesrrrhs rtest_no_manifestz!TestManifestTest.test_no_manifests#]O 449IIIIrcX|jdt|jk(sJy)zV$W XX((((rc t}|jdttdd|d|d|dgz}||j k(sJy)z;Include all *.rst, *.js, and *.css files in the whole tree.z9 global-include *.rst *.js *.css rzr{rrrNrrs rtest_global_includez$TestManifestTest.test_global_include1sh       {O " # # $ % !  ((((rct}|jdtt|d|d|dgz}||j k(sJy)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_pruneBsS    R _bor+$W XX((((r)rorprqrjrrrrrrrrrrrr __classcell__)rs@rrtrtsF%/N$ 'J1 ) ) ) ) ) ))" )rrtceZdZdZej ejddk(dZdZ dZ dZ d Z d Z d Zd Zd ZdZdZdZdZdZdZdZdZy)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)autousecRfd}|jtjd|y)z Account for stdlib compatibilityc tj}tjd|dd|||}jj |y)N distutilsrr)rexc_infologging LogRecordrecordsappend)_loggerlevelmsgargsexcreccaplogs r_logz2TestFileListTest._compat_record_logs.._logYs<,,.C##KAsD#NC NN ! !# &rrN)setattrr Log)rh monkeypatchrrs ` r_compat_record_logsz$TestFileListTest._compat_record_logsUs  ' CGGVT2rc^|jDcgc]}|j|vs|c}Scc}wr)rlevelno)rhrlevelsrs r get_recordszTestFileListTest.get_records`s%!>>AaQYY&-@AAAs**cn|j|tjgk(sJ|jyr)rr WARNclearrhrs rassertNoWarningsz!TestFileListTest.assertNoWarningscs*1R777 rctr"|jstjdyt |j |t jdkDsJ|jy)Nz'caplog checks may not work well in PyPyr) IS_PYPYrpytestxfaillenrr rrrs rassertWarningszTestFileListTest.assertWarningsgsE 6>> LLB Ct''9:Q> >> LLNrc|D]p}tjj|j|}tjj |\}}tj |dt |ry)NT)exist_ok)rrrrcsplitmakedirsr()rhrfiledirname _basenames r make_fileszTestFileListTest.make_filesnsU D77<< t4D!#t!4 GY KK$ / $K  rct}t}|jddddd|d|d|d|d |d |d |d |d |d|dgtd}|j dD]}|s|j |ddd|d|d |d |d |d|dg }|j |j|k(sJy)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)rh file_listr MANIFEST_INlinewanteds rtest_process_template_linez+TestFileListTest.test_process_template_lineus+J        % &     ! zN    ! yM  !#  (  " %%d+ 2D  + +D 1 2    % &    ! zN      &(((rct}|jdrJt}ddg|_|jdsJt}ddg|_|jd|j|jdgk(sJy)N*.pya.pyzb.pyr})rexclude_patternrrrhrs rtest_exclude_patternz%TestFileListTest.test_exclude_patternsJ ,,V444J !6* ((000J !7+ !!&)7)+++rcbt}|jg|jdrJt}|jddg|jdsJt}|jddg|jd|j|jddgk(sJy)Nrrr~*)rrinclude_patternrrrs rtest_include_patternz%TestFileListTest.test_include_patternsJ  ,,V444J  )*((000J  )*!!#&67"3333rct}dD]5}tjt5|j |ddd7y#1swYBxYw)N) includeexcludezglobal-includezglobal-excludezrecursive-includezrecursive-excludegraftpruneblarg)rrraisesr r)rhractions r"test_process_template_line_invalidz3TestFileListTest.test_process_template_line_invalidsQJ   8F56 8//7 8 8 8 8 8s AA c|jtjt}t }|j dd|dg|j d|j|jdgk(sJ|j||j d|j|jdgk(sJ|j|y)Nrr~d/c.pyz include *.pyz include *.rb set_levelrDEBUGrrrrrrrrrhrrrs rrzTestFileListTest.test_includes' J  "X,78''76(*** f%''76(*** F#rc|jtjt}t }dd|dg|_|j d|j|j d|dgk(sJ|j||j d|j|j d|dgk(sJ|j|y)Nrr~r z exclude *.pyz exclude *.rb rrrrrrrrrrrs rrzTestFileListTest.test_excludes' J !7BxL9 ''77BxL"9999 f%''77BxL"9999 F#rc|jtjt}t }|j dd|dg|j d|j|jd|dgk(sJ|j||j d|j|jd|dgk(sJ|j|y)Nrr~r zglobal-include *.pyzglobal-include *.rbr rs rrz$TestFileListTest.test_global_include s' J  "X,78''(=>62h<"8888 f%''(=>62h<"8888 F#rc|jtjt}t }dd|dg|_|j d|j|j dgk(sJ|j||j d|j|j dgk(sJ|j|y)Nrr~r zglobal-exclude *.pyzglobal-exclude *.rbrrs rtest_global_excludez$TestFileListTest.test_global_excludes' J !7BxL9 ''(=>7)+++ f%''(=>7)+++ F#rc|jtjt}t }|j d|d|d|dg|j d|j|j|d|dgk(sJ|j||j d|j|j|d|dgk(sJ|j|y)Nrd/b.pyd/c.txtd/d/e.pyzrecursive-include d *.pyzrecursive-include e *.pyr rs rtest_recursive_includez'TestFileListTest.test_recursive_include,s' J  Hr)}bnMN''(BC2h<J"@@@@ f%''(BC2h<J"@@@@ F#rc|jtjt}t }d|d|d|dg|_|j d|j|j d|dgk(sJ|j||j d|j|j d|dgk(sJ|j|y)Nrrrrzrecursive-exclude d *.pyzrecursive-exclude e *.pyrrs rtest_recursive_excludez'TestFileListTest.test_recursive_exclude=s' J !2h<I:O ''(BC62i="9999 f%''(BC62i="9999 F#rc|jtjt}t }|j d|d|d|dg|j d|j|j|d|dgk(sJ|j||j d|j|j|d|dgk(sJ|j|y)Nrrrf/f.pyzgraft dzgraft er rs rrzTestFileListTest.test_graftNs' J  Hr*~r(|LM'' 22h<J"@@@@ f%'' 22h<J"@@@@ F#rc|jtjt}t }d|d|d|dg|_|j d|j|j d|dgk(sJ|j||j d|j|j d|dgk(sJ|j|y)Nrrrrzprune dzprune errs r test_prunezTestFileListTest.test_prune_s' J !2h<JHN '' 262h<"8888 f%'' 262h<"8888 F#rN)rorprq__doc__rfixturergetenvrrrrrrrrr rrrrrrrr rrrrrrOs V^^IBII&@AXMN3O3B=)~,"4$8"$"$"$"$"$"$"$"$rr)1r! __future__r contextlibrrBrrrlrrarsetuptools.command.egg_inforrrsetuptools.distrsetuptools.tests.textwraprrr distutils.errorsr builtin_module_namesrrrrcontextmanagerr"r( frozensetrNrr>__annotations__chain from_iterable match_paramsr"rRmismatch_paramsrVr[r]r_rtrrrrrr2se"   MM(*3 00 0"      88!    $ UGeX&' @A y)$}o6PQ $*+.@-AB 8    G$   $  , L!   &6 #     )Q-;7-\ ,,-(7- |$/%/////0(70 '/(/4 8 %%a)a)H_$_$r