
    vKgH                       % S r SSKJr  SSKrSSKrSSKrSSKrSSKrSSKrSSK	r	SSK
r
SSKrSSKJrJrJr  SSKJr  SSKJr  SSKJr  SSKJr  S	\	R0                  ;   rS
 rSSS/S.rS\-  r\R:                  S 5       rS r\ " \!" \/ SQ5      5      r"SS/SS/4SS// SQ4SSS/S/4S/ SQS/4SS// 4S S!/S"/4S#/ S$QS%/4S&S'S(/S)/4S*/ S+Q/ 4S,/ S-QS.S//4S0S1S2// S3Q4S4/ S5QS6/4S7S8// S9Q4/r#S:\$S;'    \RJ                  RM                  S< \# 5       5      r'\RP                  " \'S=9S> 5       r)\RJ                  RM                  S? \# 5       5      r*\RP                  " \*S=9S@ 5       r+SA r,SB r- " SC SD5      r. " SE SF\.5      r/ " SG SH\.5      r0g)Izsdist tests    )annotationsN)FileListegg_infotranslate_pattern)Distribution)DALS)log)DistutilsTemplateError__pypy__c                B    U R                  S[        R                  5      $ )z"Converts '/' in a string to os.sep/)replaceossep)ss    ^/var/www/highfloat_scraper/venv/lib/python3.13/site-packages/setuptools/tests/test_manifest.pymake_local_pathr      s    99S"&&!!    appz0.0)nameversionpackagesz*from setuptools import setup

setup(**%r)
c               #  0  #    [         R                  [         R                  p[        R                  " 5       [        R                  " 5       s[         l        [         l         S v   Xs[         l        [         l        g ! Xs[         l        [         l        f = f7fN)sysstdoutstderrioStringIO)
old_stdout
old_stderrs     r   quietr"   /   sT      ZZ
[[]BKKMCJ
8!+
CJ
CJs   AB A; $B;BBc                8    [        U S5      R                  5         g )Nwb)openclose)filenames    r   touchr(   9   s    4 r   )
README.rstMANIFEST.insetup.pyzapp.egg-info/PKG-INFOzapp.egg-info/SOURCES.txtz!app.egg-info/dependency_links.txtzapp.egg-info/top_level.txtzapp/__init__.pyfoobarfoobarfoo/bar)zfoo/bar/bazz	./foo/barr,   z*.txtzfoo.txtzbar.txtzfoo/foo.txtz	dir/*.txt)zdir/foo.txtzdir/bar.txtzdir/.txtznotdir/foo.txtz*/*.pyzbin/start.pyzdocs/page-?.txtzdocs/page-9.txtzdocs/page-10.txtz
foo/**/bar)zfoo/bing/barzfoo/bing/bang/barr/   zfoo/abarzfoo/**zfoo/bar/bing.pyzfoo/xz/foo/xz**)xzabc/xyzz@nythingzpre[one]post)preopostprenpostpreepostprepost
preonepostzhello[!one]worldhelloxworldhelloyworld)hellooworld
helloworldhellooneworldz
[]one].txt)zo.txtz].txtze.txtzone].txtzfoo[!]one]barfooybar)zfoo]barfooobarfooebarz&list[tuple[str, list[str], list[str]]]translate_specsc              #  f   #    U H(  u  pn[        [        R                  " U5      U5      v   M*     g 7fr   zip	itertoolsrepeat.0patternmatches
mismatchess       r   	<genexpr>rI      s1      -(7$* 	!7++(7   /1)paramsc                6    [        [        U R                  5      $ r   mapr   paramrequests    r   pattern_matchrR          ..r   c              #  f   #    U H(  u  pn[        [        R                  " U5      U5      v   M*     g 7fr   r@   rD   s       r   rI   rI      s1      0(7$* 	!:..(7rJ   c                6    [        [        U R                  5      $ r   rM   rP   s    r   pattern_mismatchrV      rS   r   c                N    U u  p[        U5      R                  U5      (       d   eg r   r   match)rR   rF   targets      r   test_translated_pattern_matchr[      s%    #OGW%++F3333r   c                N    U u  p[        U5      R                  U5      (       a   eg r   rX   )rV   rF   rZ   s      r    test_translated_pattern_mismatchr]      s(    &OG )//77777r   c                       \ rS rSrS rS rSrg)TempDirTestCase   c                    [         R                  " 5       U l        [        R                  " 5       U l        [        R                  " U R                  5        g r   )tempfilemkdtemptemp_dirr   getcwdold_cwdchdirselfmethods     r   setup_methodTempDirTestCase.setup_method   s/     ((*yy{
r   c                    [         R                  " U R                  5        [        R                  " U R
                  5        g r   )r   rg   rf   shutilrmtreerd   rh   s     r   teardown_methodTempDirTestCase.teardown_method   s"    
dmm$r   )rf   rd   N)__name__
__module____qualname____firstlineno__rk   rp   __static_attributes__ r   r   r_   r_      s     
%r   r_   c                  p   ^  \ rS rSrU 4S jrS rS rS rS rS r	S r
S	 rS
 rS rS rS rS rSrU =r$ )TestManifestTest   c                  > [         TU ]  U5        [        [        R                  R                  U R                  S5      SSS9nUR                  [        5        UR                  5          S H6  n[        [        R                  R                  U R                  U5      5        M8     [        R                  R                  U R                  S5      n[        R                  " U5        S H+  n[        [        R                  R                  XC5      5        M-     [        R                  R                  US5      n[        R                  " U5        S	 H+  n[        [        R                  R                  XS5      5        M-     g )
Nr+   wutf-8encoding)r)   .hidden.rsttesting.rstLICENSEr   )z__init__.pya.txtb.txtzc.rststatic)zapp.jsz
app.js.mapzapp.csszapp.css.map)superrk   r%   r   pathjoinrd   writeSETUP_PYr&   r(   mkdir)ri   rj   ffnametest_pkgr   	__class__s         r   rk   TestManifestTest.setup_method   s    V$dmmZ8#P				$ ME"'',,t}}e45 M 77<<u5
?E"'',,x/0 @ h1
GE"'',,v-. Hr   c                    [         R                  R                  U R                  S5      n[	        USSS9 nUR                  [        U5      5        SSS5        g! , (       d  f       g= f)zWrite a MANIFEST.in.r*   r|   r}   r~   N)r   r   r   rd   r%   r   r   )ri   contentsmanifestr   s       r   make_manifestTestManifestTest.make_manifest   sD    77<<}=(C'2aGGDN# 322s   A
A(c                    [        [        5      nSUl        [        U5      nUR	                  5         UR                  5         [        UR                  R                  5      $ )z7Run egg_info and get all the files to include, as a setr+   )	r   SETUP_ATTRSscript_namer   ensure_finalizedrunsetfilelistfiles)ri   distcmds      r   	get_filesTestManifestTest.get_files   sG    K(%tn	3<<%%&&r   c                R    [         [        S/5      -
  U R                  5       :X  d   eg)z=Check a missing MANIFEST.in includes only the standard files.r*   N)default_filesr   r   ri   s    r   test_no_manifest!TestManifestTest.test_no_manifest   s#    ]O 449IIIIr   c                Z    U R                  S5        [        U R                  5       :X  d   eg)z<Check an empty MANIFEST.in includes only the standard files. N)r   r   r   r   s    r   test_empty_files!TestManifestTest.test_empty_files   s%    2 0000r   c                x    U R                  S5        [        [        SS/5      -  nXR                  5       :X  d   eg)z,Include extra rst files in the project root.zinclude *.rstr   r   N)r   r   r   r   )ri   r   s     r   test_includeTestManifestTest.test_include   s7    ?+]M$B CC((((r   c                    [         nU R                  S5        [        [        U" S5      /5      -  nX R	                  5       :X  d   eg)z0Include everything in app/ except the text fileszE
            include app/*
            exclude app/*.txt
            	app/c.rstNr   r   r   r   r   ri   mlr   s      r   test_excludeTestManifestTest.test_exclude   sE    	
 R_$5 66((((r   c                    [         nU R                  S5        [        [        U" S5      U" S5      U" S5      U" S5      U" S5      U" S5      /5      -  nX R	                  5       :X  d   eg)	zInclude with multiple patterns.zinclude app/*.txt app/static/*	app/a.txt	app/b.txtapp/static/app.jsapp/static/app.js.mapapp/static/app.cssapp/static/app.css.mapNr   r   s      r   test_include_multiple&TestManifestTest.test_include_multiple  ss    ;<{O{O"#&'#$'(%
 !  ((((r   c           	         [         nU R                  S5        [        [        U" S5      U" S5      U" S5      U" S5      /5      -  nX R	                  5       :X  d   eg)(Include the whole app/static/ directory.zgraft app/staticr   r   r   r   Nr   r   s      r   
test_graftTestManifestTest.test_graft  se    -."#&'#$'(	%
 !  ((((r   c           	         [         nU R                  S5        [        [        U" S5      U" S5      U" S5      U" S5      /5      -  nX R	                  5       :X  d   eg)r   zgraft */staticr   r   r   r   Nr   r   s      r   test_graft_glob_syntax'TestManifestTest.test_graft_glob_syntax  se    +,"#&'#$'(	%
 !  ((((r   c                    [         nU R                  S5        [        [        U" S5      U" S5      /5      -  nX R	                  5       :X  d   eg)z'Exclude all *.map files in the project.zK
            graft app/static
            global-exclude *.map
            r   r   Nr   r   s      r   test_graft_global_exclude*TestManifestTest.test_graft_global_exclude(  sO    	
 R(;%<bAU>V$W XX((((r   c           
         [         nU R                  S5        [        [        SSU" S5      U" S5      U" S5      /5      -  nX R	                  5       :X  d   eg)z;Include all *.rst, *.js, and *.css files in the whole tree.z9
            global-include *.rst *.js *.css
            r   r   r   r   r   Nr   r   s      r   test_global_include$TestManifestTest.test_global_include4  sf    	

 {O"##$%
 !  ((((r   c                    [         nU R                  S5        [        [        U" S5      U" S5      U" S5      /5      -  nX R	                  5       :X  d   eg)z@Include all files in app/, except for the whole app/static/ dir.z@
            graft app
            prune app/static
            r   r   r   Nr   r   s      r   test_graft_prune!TestManifestTest.test_graft_pruneE  sQ    	
 R_bor+$W XX((((r   rw   )rr   rs   rt   ru   rk   r   r   r   r   r   r   r   r   r   r   r   r   rv   __classcell__)r   s   @r   ry   ry      sK    %/N$	'J1
)
))
)
)
))"
) 
)r   ry   c                      \ rS rSrSr\R                  " \R                  " S5      S:H  S9S 5       r	S r
S rS	 rS
 rS rS rS rS rS rS rS rS rS rS rS rS rSrg)TestFileListTestiR  z
A copy of the relevant bits of distutils/tests/test_filelist.py,
to ensure setuptools' version of FileList keeps parity with distutils.
SETUPTOOLS_USE_DISTUTILSstdlib)autousec                T   ^ U4S jnUR                  [        R                  SU5        g)z Account for stdlib compatibilityc           	        > [         R                  " 5       n[        R                  " SUSSX#U5      nTR                  R                  U5        g )N	distutilsr   r   )r   exc_infologging	LogRecordrecordsappend)_loggerlevelmsgargsexcreccaplogs         r   _log2TestFileListTest._compat_record_logs.<locals>._log\  s:    ,,.C##KAs#NCNN!!#&r   r   N)setattrr	   Log)ri   monkeypatchr   r   s     ` r   _compat_record_logs$TestFileListTest._compat_record_logsX  s     	'
 	CGGVT2r   c                f    UR                    Vs/ sH  o3R                  U;   d  M  UPM     sn$ s  snf r   )r   levelno)ri   r   levelsrs       r   get_recordsTestFileListTest.get_recordsc  s'    !>>A>aYY&-@>AAAs   ..c                p    U R                  U[        R                  5      / :X  d   eUR                  5         g r   )r   r	   WARNclearri   r   s     r   assertNoWarnings!TestFileListTest.assertNoWarningsf  s*    1R777r   c                    [         (       a(  UR                  (       d  [        R                  " S5        g [	        U R                  U[        R                  5      5      S:  d   eUR                  5         g )Nz'caplog checks may not work well in PyPyr   )	IS_PYPYr   pytestxfaillenr   r	   r   r   r   s     r   assertWarningsTestFileListTest.assertWarningsj  sG    76>>LLBCt''9:Q>>>LLNr   c                    U Hn  n[         R                  R                  U R                  U5      n[         R                  R	                  U5      u  p4[         R
                  " USS9  [        U5        Mp     g )NT)exist_ok)r   r   r   rd   splitmakedirsr(   )ri   r   filedirname	_basenames        r   
make_filesTestFileListTest.make_filesq  sN    D77<<t4D!#t!4GKK$/$K	 r   c                   [        5       n[        nU R                  SSSSSU" S5      U" S5      U" S5      U" S	5      U" S
5      U" S5      U" S5      U" S5      U" S5      U" S5      /5        [        S5      nUR	                  S5       H  nU(       d  M  UR                  U5        M     SSSU" S5      U" S5      U" S5      U" S5      U" S5      U" S5      /	nUR                  5         UR                  U:X  d   eg )Nzfoo.tmpokxozfour.txtzbuildout.cfgz.hg/last-message.txtzglobal/one.txtzglobal/two.txtzglobal/files.xzglobal/here.tmpzf/o/f.oozdir/graft-onezdir/dir2/graft2zdir3/okzdir3/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
        
)r   r   r  r   r   process_template_linesortr   )ri   	file_listr   MANIFEST_INlinewanteds         r   test_process_template_line+TestFileListTest.test_process_template_linex  s&   J	 	 %&    !zN !yM !#
 	( 
"  %%d+D++D1 , %& !zN  

 	&(((r   c                ,   [        5       nUR                  S5      (       a   e[        5       nSS/Ul        UR                  S5      (       d   e[        5       nSS/Ul        UR                  S5        UR                  5         UR                  S/:X  d   eg )N*.pya.pyzb.pyr   )r   exclude_patternr   r  ri   r  s     r   test_exclude_pattern%TestFileListTest.test_exclude_pattern  s    J	,,V4444 J	!6*	((0000 J	!7+	!!&)7)+++r   c                x   [        5       nU R                  / 5        UR                  S5      (       a   e[        5       nU R                  SS/5        UR                  S5      (       d   e[        5       nU R                  SS/5        UR                  S5        UR                  5         UR                  SS/:X  d   eg )Nr  r  r   *)r   r  include_patternr  r   r  s     r   test_include_pattern%TestFileListTest.test_include_pattern  s    J	,,V4444 J	)*((0000 J	)*!!#&67"3333r   c                    [        5       nS H7  n[        R                  " [        5         UR	                  U5        S S S 5        M9     g ! , (       d  f       MK  = f)N)	includeexcludezglobal-includezglobal-excludezrecursive-includezrecursive-excludegraftpruneblarg)r   r   raisesr
   r
  )ri   r  actions      r   "test_process_template_line_invalid3TestFileListTest.test_process_template_line_invalid  sC    J	

F 56//7 76

 76s   A		
A	c                   UR                  [        R                  5        [        n[	        5       nU R                  SSU" S5      /5        UR                  S5        UR                  5         UR                  S/:X  d   eU R                  U5        UR                  S5        UR                  5         UR                  S/:X  d   eU R                  U5        g )Nr  r   d/c.pyzinclude *.pyzinclude *.rb	set_levelr   DEBUGr   r   r  r
  r  r   r   r   ri   r   r   r  s       r   r   TestFileListTest.test_include  s    'J	"X,78''76(***f%''76(***F#r   c                   UR                  [        R                  5        [        n[	        5       nSSU" S5      /Ul        UR                  S5        UR                  5         UR
                  SU" S5      /:X  d   eU R                  U5        UR                  S5        UR                  5         UR
                  SU" S5      /:X  d   eU R                  U5        g )Nr  r   r)  zexclude *.pyzexclude *.rb
r+  r   r,  r   r   r   r
  r  r   r   r-  s       r   r   TestFileListTest.test_exclude  s    'J	!7BxL9	''77BxL"9999f%''77BxL"9999F#r   c                   UR                  [        R                  5        [        n[	        5       nU R                  SSU" S5      /5        UR                  S5        UR                  5         UR                  SU" S5      /:X  d   eU R                  U5        UR                  S5        UR                  5         UR                  SU" S5      /:X  d   eU R                  U5        g )Nr  r   r)  zglobal-include *.pyzglobal-include *.rbr*  r-  s       r   r   $TestFileListTest.test_global_include  s    'J	"X,78''(=>62h<"8888f%''(=>62h<"8888F#r   c                   UR                  [        R                  5        [        n[	        5       nSSU" S5      /Ul        UR                  S5        UR                  5         UR
                  S/:X  d   eU R                  U5        UR                  S5        UR                  5         UR
                  S/:X  d   eU R                  U5        g )Nr  r   r)  zglobal-exclude *.pyzglobal-exclude *.rbr0  r-  s       r   test_global_exclude$TestFileListTest.test_global_exclude  s    'J	!7BxL9	''(=>7)+++f%''(=>7)+++F#r   c                   UR                  [        R                  5        [        n[	        5       nU R                  SU" S5      U" S5      U" S5      /5        UR                  S5        UR                  5         UR                  U" S5      U" S5      /:X  d   eU R                  U5        UR                  S5        UR                  5         UR                  U" S5      U" S5      /:X  d   eU R                  U5        g )Nr  d/b.pyd/c.txtd/d/e.pyzrecursive-include d *.pyzrecursive-include e *.pyr*  r-  s       r   test_recursive_include'TestFileListTest.test_recursive_include/  s    'J	Hr)}bnMN''(BC2h<J"@@@@f%''(BC2h<J"@@@@F#r   c                   UR                  [        R                  5        [        n[	        5       nSU" S5      U" S5      U" S5      /Ul        UR                  S5        UR                  5         UR
                  SU" S5      /:X  d   eU R                  U5        UR                  S5        UR                  5         UR
                  SU" S5      /:X  d   eU R                  U5        g )Nr  r8  r9  r:  zrecursive-exclude d *.pyzrecursive-exclude e *.pyr0  r-  s       r   test_recursive_exclude'TestFileListTest.test_recursive_exclude@  s    'J	!2h<I:O	''(BC62i="9999f%''(BC62i="9999F#r   c                   UR                  [        R                  5        [        n[	        5       nU R                  SU" S5      U" S5      U" S5      /5        UR                  S5        UR                  5         UR                  U" S5      U" S5      /:X  d   eU R                  U5        UR                  S5        UR                  5         UR                  U" S5      U" S5      /:X  d   eU R                  U5        g )Nr  r8  r:  f/f.pyzgraft dzgraft er*  r-  s       r   r   TestFileListTest.test_graftQ  s    'J	Hr*~r(|LM''	22h<J"@@@@f%''	22h<J"@@@@F#r   c                   UR                  [        R                  5        [        n[	        5       nSU" S5      U" S5      U" S5      /Ul        UR                  S5        UR                  5         UR
                  SU" S5      /:X  d   eU R                  U5        UR                  S5        UR                  5         UR
                  SU" S5      /:X  d   eU R                  U5        g )Nr  r8  r:  rA  zprune dzprune er0  r-  s       r   
test_pruneTestFileListTest.test_pruneb  s    'J	!2h<JHN	''	262h<"8888f%''	262h<"8888F#r   rw   N)rr   rs   rt   ru   __doc__r   fixturer   getenvr   r   r   r   r  r  r  r  r&  r   r   r   r5  r;  r>  r   rD  rv   rw   r   r   r   r   R  s    
 ^^BII&@AXMN3 O3B=)~,"4$8"$"$"$"$"$"$"$"$r   r   )1rF  
__future__r   
contextlibr   rB   r   r   rn   r   rb   r   setuptools.command.egg_infor   r   r   setuptools.distr   setuptools.tests.textwrapr   r   r	   distutils.errorsr
   builtin_module_namesr   r   r   r   contextmanagerr"   r(   	frozensetrN   r   r>   __annotations__chainfrom_iterablematch_paramsrG  rR   mismatch_paramsrV   r[   r]   r_   ry   r   rw   r   r   <module>rW     s]    "  	   	  
   M M ( *  3
00
0" 
  	 8 8! 		
$ UGeX&'@Ay)$}o6<?O>PQ$*+.@-AB 	8	 		G$	
 	$
 	,	L! 		&6 	#	 		)Q-;7 -\
 ,, -(7-  |$/ %/ //// 0(70  '/ (/4
8
% %a) a)H_$ _$r   