
    vKg~              	       l   S 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  SSKJr  SSKJr  SSKrSSKrSSK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SKJr  SSKJ r   SSK!J"r"  SSK#r#SSK$J%r%  SSS/SS/0S\RL                  RO                  SS5      /4/S.r(S\(-  r)\" S\RL                  RO                  SS5      /\RL                  RO                  SS5      /S9r*\*RV                  \*RX                  -   r-\R\                  S 5       r/S r0S r1S r2S  r3\Rh                  Rk                  \3" 5       S!S"9r6\Rh                  Ro                  S#S$S"9r8\Rh                  Ro                  \#Rr                  Ru                  S%5      (       + S&S"9r;S' r<S( r= " S) S*5      r>S+ r? " S, S-5      r@S. rAS/ rBg)0zsdist tests    Ncleandoc)Path)mock)CommandSetuptoolsDeprecationWarning)metadata)manifest_maker)sdist)Distribution)	Extension)fail_on_ascii   )	Filenames)	run_setup
sdist_testz0.0z*.txtdatade.dat)nameversionpackagespackage_data
data_filesz*from setuptools import setup

setup(**%r)
sdist_test.fzf.cf.hr   sourcesdependsc               #   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     [/var/www/highfloat_scraper/venv/lib/python3.13/site-packages/setuptools/tests/test_sdist.pyquietr*   9   sT      ZZ
[[]BKKMCJ
8!+
CJ
CJs   AB A; $B;BBc                     [        U [        5      (       d/  U R                  [        R                  R                  S5      S5      $ U R                  [        R                  S5      $ )Nascii   //)
isinstancestrreplaceossepencodepaths    r)   posixr7   D   sB    dC  ||BFFMM'2D99||BFFC((    c                     [        U [        5      (       a  [        R                  " SU 5      $  U R	                  S5      n [        R                  " SU 5      n U R                  S5      n U $ ! [         a     U $ f = f)NNFDutf-8)r/   r0   unicodedata	normalizedecoder4   UnicodeErrorr5   s    r)   	decomposer@   L   su    $$$UD11{{7#$$UD1{{7# K  Ks   9A) )
A76A7c                 p    [        U S5       nUR                  5       sS S S 5        $ ! , (       d  f       g = f)Nrb)openread)filenamefps     r)   read_all_bytesrG   X   s#    	h	wwy 
		s   '
5c                       [         R                  " [        R                  S9u  p[        R
                  " U 5        [        R                  " U5        g ! [         a     gf = f)N)suffixT)tempfilemkstempr   latin_1r2   closeremove	Exception)descrE   s     r)   latin1_failrQ   ]   sH    !))1B1BC

		( s   AA 
A A z)System does not support latin-1 filenames)reasonz%os.environ.get('PYTEST_XDIST_WORKER')zpytest-dev/pytest-xdist#843
setuptoolsz/the test is not supported with stdlib distutilsc                 :    [        U S5      R                  5         U $ )Nwb)rC   rM   r5   s    r)   touchrV   v   s    tKr8   c                      [         R                  " X5        U$ ! [        [        4 a    [        R
                  " S5         g f = f)Nzsymlink not supported in OS)r2   symlinkOSErrorNotImplementedErrorpytestskip)srcdsts     r)   symlink_or_skip_testr_   {   sA    


3 J () 12s    &AAc                   b   \ rS rSr\R
                  " SS9S 5       rS rS rS r	S r
S	 rS
 rS rS S S S S.r\\R                   R#                  S\R%                  5       5      S 5       5       rS rS rS rS rS rS r\S 5       r\S 5       r\S 5       r\S 5       r\ S 5       r!\\ S 5       5       r"\#S 5       r$\ \S  5       5       r%S!S"S#S$.r&\R                   R#                  S%\&R%                  5       5      S& 5       r'S' r(S( r)S) r*\R                   RW                  S*5      S+ 5       r,S,r-g-).TestSdistTest   T)autousec              #     #    US-  nUR                  5         US-  R                  [        SS9  US-  nUR                  5         US-  nUR                  5         S H  n[        X$-  5        M     [        US-  5        [         H  n[        X-  5        M     UR                  5          Uv   S S S 5        g ! , (       d  f       g = f7f)	Nproject_rootsetup.pyr;   encodingr   r   )z__init__.pya.txtb.txtc.rstr   )mkdir
write_textSETUP_PYrV   EXTENSION_SOURCESas_cwd)selftmpdirtest_pkgdata_folderfnames        r)   
source_dirTestSdistTest.source_dir   s     .(	*	((G(D L(sl @E("# @kG#$ 'E&.! ' ]]_L __s   B%C'B5,	C5
C?Cc                 `   UR                   R                  n[        R                  R	                  SS5      U;   d   e[        R                  R	                  SS5      U;   d   e[        R                  R	                  SS5      U;  d   e[        R                  R	                  SS5      U;   d   eg )Nr   ri   rj   rk   r   r   )filelistfilesr2   r6   join)rq   cmdmanifests      r)   assert_package_data_in_manifest-TestSdistTest.assert_package_data_in_manifest   s    <<%%ww||L'2h>>>ww||L'2h>>>ww||L'2(BBBww||C)X555r8   c                     0 [         ES[        /0En[        U5      nSUl        [	        U5      nUR                  5         [        5          UR                  5         S S S 5        U$ ! , (       d  f       U$ = f)Next_modulesrf   )SETUP_ATTRS	EXTENSIONr   script_namer   ensure_finalizedr*   runrq   setup_attrsdistr|   s       r)   setup_with_extension"TestSdistTest.setup_with_extension   se    AAmi[AK(%DkWGGI  
 W 
s   	A$$
A3c                     [        [        5      nSUl        [        U5      nUR	                  5         [        5          UR                  5         SSS5        U R                  U5        g! , (       d  f       N = f)zRegression test for pull request #4: ensures that files listed in
package_data are included in the manifest even if they're not added to
version control.
rf   N)r   r   r   r   r   r*   r   r~   )rq   r   r|   s      r)   test_package_data_in_sdist(TestSdistTest.test_package_data_in_sdist   sV     K(%DkWGGI  	,,S1 Ws   A''
A5c                    0 [         ESS0EnUS   (       d   e[        U5      nSUl        [        U5      nUR	                  5         [        5          UR                  5         SSS5        U R                  U5        g! , (       d  f       N = f)z=
Ensure package_data and include_package_data work
together.
include_package_dataTr   rf   N)r   r   r   r   r   r*   r   r~   r   s       r)   3test_package_data_and_include_package_data_in_sdistATestSdistTest.test_package_data_and_include_package_data_in_sdist   sw    
 DC&<dC>***K(%DkWGGI  	,,S1 Ws   A;;
B	c                     U R                  5       nU R                  U5        UR                  R                  n[         H
  nX2;   a  M
   e   g)zu
Ensure that the files listed in Extension.sources and Extension.depends
are automatically included in the manifest.
N)r   r~   ry   rz   ro   )rq   r|   r}   r6   s       r)   test_extension_sources_in_sdist-TestSdistTest.test_extension_sources_in_sdist   sE    
 ''),,S1<<%%%D### &r8   c                     [          H  n[        R                  " U5        M     U R                  5       nU R	                  U5        UR
                  R                  n[          H
  nX;  a  M
   e   g)z
Similar to test_extension_sources_in_sdist but the referenced files don't exist.
Missing files should not be included in distribution (with no error raised).
N)ro   r2   rN   r   r~   ry   rz   )rq   r6   r|   r}   s       r)   test_missing_extension_sources,TestSdistTest.test_missing_extension_sources   s\    
 &DIIdO & ''),,S1<<%%%D''' &r8   c                    / n[          H|  n[        R                  R                  U5      u  p4US-   U-   n[        R                  " X%5        [        [        R                  R                  U5      U5        UR                  U5        M~     U R                  5       nU R                  U5        UR                  R                  n[          H
  nX';   a  M
   e   U H
  nX';  a  M
   e   g)z
Similar to test_extension_sources_in_sdist but the referenced files are
instead symbolic links to project-local files. Referenced file paths
should be included. Symlink targets themselves should NOT be included.
z_target.N)ro   r2   r6   splitextrenamer_   basenameappendr   r~   ry   rz   )rq   	symlinkedr6   baseexttargetr|   r}   s           r)    test_symlinked_extension_sources.TestSdistTest.test_symlinked_extension_sources   s     	%D((.IDJ&,FIId# !1!1&!94@V$ & ''),,S1<<%%%D### &D''' r8   c                  |    [         R                  R                  [         R                  R                  SS5      5      $ )Nr   r   )r2   r6   abspathr{    r8   r)   <lambda>TestSdistTest.<lambda>  s!    GGOOBGGLLu=>r8   c                  F    [         R                  R                  SSSS5      $ )Nr   ..r   r2   r6   r{   r   r8   r)   r   r     s    GGLLt\5Ar8   c                  B    [         R                  R                  SS5      $ )Nr   zthis_file_does_not_exist.hr   r   r8   r)   r   r     s    GGLL'CDr8   c                  h    [        [        [        R                  R	                  SS5      5      S5      $ )Nr   zoutside_of_project_root.hz	symlink.h)r_   rV   r2   r6   r{   r   r8   r)   r   r     s%     bggll4)DEFr8   )zmust be relativezcan't have `..` segmentszdoesn't existzmust be inside the project rootrR   c                    U R                   U   " 5       n[        S/ U/S9n0 [        ESU/0En[        U5      nSUl        [        U5      nUR                  5         [        5          UR                  [        R                  5         UR                  5         SSS5        SSS5        U R                  U5        UR                  R                  nX8;  d   eUR                   V	V
Vs/ sH-  u  pnU	S:X  d  M  U
[        R                  :X  d  M$  X;;   d  M+  UPM/     nn
n	n[!        U5      S:X  d   eUu  nX;   d   eg! , (       d  f       N= f! , (       d  f       N= fs  snn
n	f )a  
Due to backwards compatibility reasons, `Extension.depends` should accept
invalid/weird paths, but then ignore them when building a sdist.

This test verifies that the source distribution is still built
successfully with such paths, but that instead of adding these paths to
the manifest, we emit an informational message, notifying the user that
the invalid path won't be automatically included.
r   r   r   rf   Nrootr   )_INVALID_PATHSr   r   r   r   r   r   r*   at_levelloggingINFOr   r~   ry   rz   record_tupleslen)rq   rR   caploginvalid_path	extensionr   r   r|   r}   loggerlevelmessageexpected_messages                r)   test_invalid_extension_depends,TestSdistTest.test_invalid_extension_depends  sJ    **624!N
	
 BAmi[AK(%DkWfoogll3GGI 4W 	,,S1<<%%+++ -3,@,@
,@(&   W\\)	 
 !+ ,@ 	 
 #$))).	)))% 43WW
s<   % E	D8E	$E4E
EE8
E	E		
Ec                 p  ^ SSK Jn  [        R                  " 5       m " U4S jSU5      n0 [        ESS0EnUS   (       d   e[        U5      nSUl        [        U5      nUR                  5         S	U0Ul	        S	U0UR                  l	        UR                  R                  S	5      U:X  d   eS
n[        5          [        R                  " [        US9   UR!                  5         SSS5        SSS5        TR#                  5         U R%                  U5        g! , (       d  f       N8= f! , (       d  f       NA= f)zY
Ensure projects defining custom build_py don't break
when creating sdists (issue #2849)
r   )build_pyc                   0   >^  \ rS rSrSrU U4S jrSrU =r$ )9TestSdistTest.test_custom_build_py.<locals>.CustomBuildPyiL  z@
Some projects have custom commands inheriting from `distutils`
c                 .   > T" 5         [         TU ]  5       $ r!   )superget_data_files)rq   	__class__using_custom_command_guards    r)   r   HTestSdistTest.test_custom_build_py.<locals>.CustomBuildPy.get_data_filesQ  s    *,w-//r8   r   )__name__
__module____qualname____firstlineno____doc__r   __static_attributes____classcell__)r   r   s   @r)   CustomBuildPyr   L  s    0 0r8   r   r   Tr   rf   r   zsetuptools instead of distutils)matchN)distutils.command.build_pyr   r   Mockr   r   r   r   r   cmdclassdistributionget_command_classr*   r[   warnsr   r   assert_calledr~   )rq   OrigBuildPyr   r   r   r|   msgr   s          @r)   test_custom_build_py"TestSdistTest.test_custom_build_pyC  s    
 	G%)YY["	0K 	0 DC&<dC>***K(%Dk #M2%/$?!11*=NNN/Wfll#?sKGGI LW 	#002,,S1	 LKWWs$   9D'D$D'
D$	 D''
D5c                 
   [        [        5      nSUl        [        U5      nUR	                  5         [        5          UR                  5         S S S 5        UR                  R                  nSU;   d   eg ! , (       d  f       N-= fNfoo.pyrf   )	r   r   r   r   r   r*   r   ry   rz   rq   r   r|   r}   s       r)   test_setup_py_exists"TestSdistTest.test_setup_py_existsi  sc    K(#DkWGGI  <<%%X%%%	 Ws   A44
Bc                 ~   [        [        5      nSUl        [        U5      nUR	                  5         [
        R                  R                  S5      (       a  [
        R                  " S5        [        5          UR                  5         S S S 5        UR                  R                  nSU;  d   eg ! , (       d  f       N-= fr   )r   r   r   r   r   r2   r6   existsrN   r*   r   ry   rz   r   s       r)   test_setup_py_missing#TestSdistTest.test_setup_py_missingu  s    K(#Dk77>>*%%IIj!WGGI  <<%%)))	 Ws   6B..
B<c                 v   [        SSSS9 nUR                  S5        S S S 5        [        [        5      nSUl        [        U5      nUR                  5         [        5          UR                  5         S S S 5        UR                  R                  nSU;  d   eg ! , (       d  f       N= f! , (       d  f       N>= f)NMANIFEST.inwr;   rg   zexclude setup.pyr   rf   )rC   writer   r   r   r   r   r*   r   ry   rz   )rq   manifest_filer   r|   r}   s        r)   test_setup_py_excluded$TestSdistTest.test_setup_py_excluded  s    -w7= 23 8 K(#DkWGGI  <<%%))) 87 Ws   B!B*
B'*
B8c                    [        US-  5        [        US-  5        [        [        5      nSUl        [	        U5      nUR                  5         [        5          UR                  5         SSS5        [        S UR                  R                  5      nSU;  d   U5       eSU;  d   U5       eSU;  d   U5       eg! , (       d  f       NW= f)z~
Make sure default files (README.*, etc.) are added in a case-sensitive
way to avoid problems with packages built on Windows.
z
readme.rstz	SETUP.cfgzsetup.PYNc                 "    U R                  5       $ r!   )lower)xs    r)   r   >TestSdistTest.test_defaults_case_sensitivity.<locals>.<lambda>  s
    r8   rf   z	setup.cfg)rV   r   r   r   r   r   r*   r   mapry   rz   rq   rv   r   r|   r}   s        r)   test_defaults_case_sensitivity,TestSdistTest.test_defaults_case_sensitivity  s     	j<'(j;&'K( &DkWGGI  *CLL,>,>?8+5X5+)383)(*4H4* Ws   B::
Cc                    SSSSSSSS.nSSSS.n0 UEUER                  5        HA  u  pE[        X5      R                  R                  SSS9  [        X5      R	                  USS9  MC     U R                  5       nU R                  U5        UR                  R                   Vs1 sH"  owR                  [        R                  S	5      iM$     nnU H6  n	[        R                  R                  U	5      (       d   eX;  a  M0   X45       e   U H6  n	[        R                  R                  U	5      (       d   eX;   a  M0   X45       e   g s  snf )
NzJglobal-include LICEN[CS]E* COPYING* NOTICE* AUTHORS*
global-include *.txt
 )r   zBtest/.venv/lib/python3.9/site-packages/bar-2.dist-info/AUTHORS.rstzDsrc/.nox/py/lib/python3.12/site-packages/bar-2.dist-info/COPYING.txtzEdoc/.tox/default/lib/python3.11/site-packages/foo-4.dist-info/LICENSEz.venv-requirements.txtz.tox-coveragerc.txtz.noxy/coveragerc.txt)zA.tox/release/lib/python3.11/site-packages/foo-4.dist-info/LICENSEz@.nox/py/lib/python3.12/site-packages/bar-2.dist-info/COPYING.txtz=.venv/lib/python3.9/site-packages/bar-2.dist-info/AUTHORS.rstT)parentsexist_okr;   rg   r.   )itemsr   parentrl   rm   r   r~   ry   rz   r1   r2   r3   r6   r   )
rq   rv   includedexcludedfilecontentr|   fr}   r6   s
             r)   #test_exclude_dev_only_cache_folders1TestSdistTest.test_exclude_dev_only_cache_folders  sP   )
 SUTVUW&(#%$&
( RTPRMO
 65H5;;=MD"))//t/L"--g-H > ''),,S147LL4F4FG4FqIIbffc*4FGD77>>$'''''9$)99'  D77>>$''''#5d%55# 	 Hs   #(Ec                 >   [        [        5      nSUl        [        U5      n[        R
                  R                  SS5      Ul        [        R                  " S5        [        R
                  R                  SS5      n[        U5        [        5          UR                  5         UR                  R                  U5        UR                  5         S S S 5        [        UR                  5      nUR!                  S5      n[#        U5      U;   d   eg ! , (       d  f       NF= f)Nrf   sdist_test.egg-infoSOURCES.txtr   u   smörbröd.pyUTF-8)r   r   r   r
   r2   r6   r{   r}   rl   rV   r*   r   ry   r   write_manifestrG   r>   r7   )rq   r   mmrE   contents
u_contentss         r)   +test_manifest_is_written_with_utf8_encoding9TestSdistTest.test_manifest_is_written_with_utf8_encoding  s     K(%D!ggll#8-H
&' 77<<o> 	h WFFHKKx( 
 ""++. __W-
 X*,,, Ws   <D
Dc                    [        [        5      nSUl        [        U5      n[        R
                  R                  SS5      Ul        [        R                  " S5        [        R
                  R                  S[        R                  5      n[        U5        [        5          UR                  5         UR                  S5      nUR                  R                   R#                  U5        UR%                  5         S S S 5        ['        UR                  5      nUR                  S5        [)        U5      U;   d   eWUR                  R                   ;   d   eg ! , (       d  f       Nb= f)Nrf   r  r  
   sdist_testr;   r  )r   r   r   r
   r2   r6   r{   r}   rl   r   utf_8rV   r*   r   r>   ry   rz   r   r  rG   r7   rq   r   r	  rE   
u_filenamer
  s         r)   )test_write_manifest_allows_utf8_filenames7TestSdistTest.test_write_manifest_allows_utf8_filenames  s     K(%D!ggll#8-H
&'77<<y? 	h WFFH!1JKK$$Z0  ""++. 	  X(*** R[[.....! Ws    AE
E!c                    [        [        5      nSUl        [        U5      n[        R
                  R                  SS5      Ul        [        R                  " S5        [        R
                  R                  S[        R                  5      n[        5          UR                  5         UR                  SS5      nUR                  R                  U5        UR!                  5         SSS5        [#        UR                  5      nUR                  S5        [%        U5      U;  d   eWUR                  R&                  ;  d   eg! , (       d  f       Nb= f)	z
Files that cannot be encoded to UTF-8 (specifically, those that
weren't originally successfully decoded and have surrogate
escapes) should be omitted from the manifest.
See https://bitbucket.org/tarek/distribute/issue/303 for history.
rf   r  r  r  r;   surrogateescapeNr  )r   r   r   r
   r2   r6   r{   r}   rl   r   rL   r*   r   r>   ry   r   r  rG   r7   rz   r  s         r)   ,test_write_manifest_skips_non_utf8_filenames:TestSdistTest.test_write_manifest_skips_non_utf8_filenames  s     K(%D!ggll#8-H
&' 77<<y/@/@A WFFH!2CDJKKz*  ""++. 	  Xh... !2!2222! Ws   AD??
Ec                    [        [        5      nSUl        [        U5      nUR	                  5         [        5          UR                  5         S S S 5        [        R                  R                  S[        R                  5      n[        R                  R                  SS5      Ul        [        UR                  S5      nUR                  SU-   5        UR                  5         [!        U5        / UR"                  l        [        5          UR'                  5         S S S 5        UR)                  S5      nX2R"                  R$                  ;   d   eg ! , (       d  f       GN= f! , (       d  f       NM= f)Nrf   r  r  r  ab   
r;   )r   r   r   r   r   r*   r   r2   r6   r{   r   r  r}   rC   r   rM   rV   ry   rz   read_manifestr>   rq   r   r|   rE   r}   s        r)   (test_manifest_is_read_with_utf8_encoding6TestSdistTest.test_manifest_is_read_with_utf8_encoding8  s     K(%Dk WGGI  77<<y?ww||$9=Id+ux'( 	h  W  ??7+<<-----) W W   EE 
E 
E.c                    [        [        5      nSUl        [        U5      nUR	                  5         [        5          UR                  5         S S S 5        [        R                  R                  S[        R                  5      n[        R                  R                  SS5      Ul        [        UR                  S5      nUR                  SU-   5        UR                  5         [!        U5        / UR"                  l        [        5          UR'                  5         S S S 5        UR)                  S5      nX2R"                  R$                  ;  d   eg ! , (       d  f       GN= f! , (       d  f       NM= f)Nrf   r  r  r  r  r  latin-1)r   r   r   r   r   r*   r   r2   r6   r{   r   rL   r}   rC   r   rM   rV   ry   rz   r  r>   r  s        r)   +test_read_manifest_skips_non_utf8_filenames9TestSdistTest.test_read_manifest_skips_non_utf8_filenamesW  s    K(%Dk WGGI  77<<y/@/@Aww||$9=Id+ux'( 	h  W  ??9-||11111) W Wr   c                    [        U R                  [        5      5      nSUl        [	        U5      nUR                  5         [        R                  R                  S[        R                  5      n[        U5        [        5          UR                  5         S S S 5        [        R                  S:X  a  [!        U5      n[        R"                  " 5       n[        R                  S:X  a`  US:X  a-  UR%                  S5      nX2R&                  R(                  ;   d   eg UR%                  S5      nX2R&                  R(                  ;   d   eg UR%                  S5      nX2R&                  R(                  ;   d   eg ! , (       d  f       N= f)Nrf   r  darwinwin32cp1252mbcsr;   )r   make_stringsr   r   r   r   r2   r6   r{   r   r  rV   r*   r   r"   platformr@   getfilesystemencodingr>   ry   rz   rq   r   r|   rE   fs_encs        r)   %test_sdist_with_utf8_encoded_filename3TestSdistTest.test_sdist_with_utf8_encoded_filenamev  s    D--k:;%Dk77<<y?hWGGI  <<8# *H**,<<7"!#??84<<#5#5555#??62<<#5#5555w/H||11111% Ws   E22
F c                    [        U[        5      (       a3  UR                  5        VVs0 sH  u  p#X R                  U5      _M     snn$ [        U[        5      (       a  [	        [        U R                  U5      5      $ [        U5      $ s  snnf r!   )r/   dictr   r*  listr   r0   )clsitemkeyvalues       r)   r*  TestSdistTest.make_strings  so    dD!!CG::<P<ZSC))%00<PPdD!!C,,d3444y Qs   Bc                    [        U R                  [        5      5      nSUl        [	        U5      nUR                  5         [        R                  R                  S[        R                  5      n[        U5        [        R                  R                  U5      (       d   e[        5          UR                  5         S S S 5        [        R                   S:X  aJ  [        R"                  " 5       nUS:w  a  SnUR%                  U5      nX2R&                  R(                  ;   d   eg UR%                  S5      nX2R&                  R(                  ;  d   eg ! , (       d  f       N= f)Nrf   r  r'  r)  r"  )r   r*  r   r   r   r   r2   r6   r{   r   rL   rV   isfiler*   r   r"   r+  r,  r>   ry   rz   r-  s        r)   'test_sdist_with_latin1_encoded_filename5TestSdistTest.test_sdist_with_latin1_encoded_filename  s    D--k:;%Dk 77<<y/@/@Ahww~~h''''WGGI  <<7" ..0F"v.H||11111  y1H<<#5#5555! Ws   *E
Ez
            [metadata]
            name = testing
            version = file: src/VERSION.txt
            license_files = DOWHATYOUWANT
            long_description = file: README.rst, USAGE.rst
            a  
            [project]
            name = "testing"
            readme = "USAGE.rst"
            license = {file = "DOWHATYOUWANT"}
            dynamic = ["version"]
            [tool.setuptools.dynamic]
            version = {file = ["src/VERSION.txt"]}
            a	  
            [project]
            name = "testing"
            readme = "USAGE.rst"
            license = {file = "DOWHATYOUWANT"}
            dynamic = ["version"]
            [tool.setuptools.dynamic]
            version = {file = "src/VERSION.txt"}
            )z(setup.cfg - long_description and versionz@pyproject.toml - static readme/license files and dynamic versionz3pyproject.toml - directive with str instead of listconfigc                 `   UR                  S5      u  n  nU R                  U   nUS-  R                  5         US-  R                  SSS9  US-  R                  SSS9  US	-  R                  SSS9  US
-  R                  SSS9  X-  R                  USS9  [	        S/ 05      nSUl        UR                  5         [        U5      nUR                  5         [        5          UR                  5         S S S 5        SUR                  R                  ;   d  SUR                  R                  ;   d   eS	UR                  R                  ;   d   eS
UR                  R                  ;   d   eSUR                  R                  ;  d   eSUR                  R                  ;  d   eg ! , (       d  f       N= f)Nz - r]   zsrc/VERSION.txtz0.42r;   rg   z
README.rstzhello world!z	USAGE.rstDOWHATYOUWANTr   rf   zsrc\VERSION.txtr.   \)	partition_EXAMPLE_DIRECTIVESrl   rm   r   r   parse_config_filesr   r   r*   r   ry   rz   )rq   rv   r=  config_file_config_textr   r|   s           r)   .test_add_files_referenced_by_config_directives<TestSdistTest.test_add_files_referenced_by_config_directives  s   ",,U3Q..v6	e	""$	'	'33FW3M	l	"..~.P	k	!--nw-O	o	%11.71S		!--kG-LZ,-%!DkWGGI  !3!33!S\\%7%77	
8 cll00000#,,"4"4444#,,,,,,,3<<----- Ws   F
F-c                 &   [        US-  5        [        [        5      nSUl        [	        U5      nUR                  5         [        5          UR                  5         SSS5        UR                  R                  nSU;   d   eg! , (       d  f       N-= f)zG
Check if pyproject.toml is included in source distribution if present
pyproject.tomlrf   N)
rV   r   r   r   r   r   r*   r   ry   rz   r   s        r)   test_pyproject_toml_in_sdist*TestSdistTest.test_pyproject_toml_in_sdist  sq     	j++,K(%DkWGGI <<%%8+++ Ws   
B
Bc                    [        US-  5        [        SSSS9 n[        SUS9  SSS5        [        [        5      nS	Ul        [        U5      nUR                  5         [        5          UR                  5         SSS5        UR                  R                  nSU;  d   eg! , (       d  f       N= f! , (       d  f       N>= f)
z8
Check that pyproject.toml can excluded even if present
rJ  r   r   r;   rg   zexclude pyproject.toml)r   Nrf   )rV   rC   printr   r   r   r   r   r*   r   ry   rz   )rq   rv   mtsr   r|   r}   s         r)   test_pyproject_toml_excluded*TestSdistTest.test_pyproject_toml_excluded  s     	j++,-w73*5 8K(%DkWGGI <<%%x/// 87 Ws   B (B1 
B.1
B?c                    [        US-  5        [        0 [        ESS0E5      n[        U5      nUR	                  5         [        5          UR                  5         S S S 5        UR                  R                  nSU;  d   e[        0 [        ESS0E5      nUR                  S5      n/ UR                  QSPUl
         " S S[        5      nUR                  R                  US9  [        U5      nS	Ul        UR	                  5         [        5          UR                  5         S S S 5        UR                  R                  nSU;   d   eg ! , (       d  f       N= f! , (       d  f       N>= f)
N.myfile~r   rf   build)build_customNc                   ,    \ rS rSrS rS rS rS rSrg)FTestSdistTest.test_build_subcommand_source_files.<locals>.build_customi&  c                     g r!   r   rq   s    r)   initialize_optionsYTestSdistTest.test_build_subcommand_source_files.<locals>.build_custom.initialize_options'  s    #r8   c                     g r!   r   rY  s    r)   finalize_optionsWTestSdistTest.test_build_subcommand_source_files.<locals>.build_custom.finalize_options)  s    r8   c                     g r!   r   rY  s    r)   r   JTestSdistTest.test_build_subcommand_source_files.<locals>.build_custom.run+  s    3r8   c                     S/$ )NrS  r   rY  s    r)   get_source_filesWTestSdistTest.test_build_subcommand_source_files.<locals>.build_custom.get_source_files-  s
    "|#r8   r   N)	r   r   r   r   rZ  r]  r   rb  r   r   r8   r)   rU  rW  &  s    -+$r8   rU  )rU  T)rV   r   r   r   r   r*   r   ry   rz   get_command_objsub_commandsr   r   updateuse_defaults)rq   rv   r   r|   r}   rT  rU  s          r)   "test_build_subcommand_source_files0TestSdistTest.test_build_subcommand_source_files  s/   j:%& F{FM:FGDkWGGI <<%%))) F{FM:FG$$W-Ju11J3IJ	$7 	$ 	,7DkWGGI <<%%X%%%9 W2 Ws   	EE
E
E&z6os.environ.get('SETUPTOOLS_USE_DISTUTILS') == 'stdlib'c           	          [        0 [        ESSS[        R                  " S5      00S.E5      n[	        U5      nUR                  5         [        5          UR                  5         SSS5        g! , (       d  f       g= f)zC
Ensure if build_base is a pathlib.Path, the build still succeeds.
rf   rT  
build_base)r   optionsN)r   r   pathlibr   r   r   r*   r   )rq   rv   r   r|   s       r)   test_build_base_pathlib%TestSdistTest.test_build_base_pathlib:  sh    
  

%,W0E!FG
 
 DkWGGI WWs   A..
A<r   N).r   r   r   r   r[   fixturerv   r~   r   r   r   r   r   r   r   skip_under_stdlib_distutilsmarkparametrizekeysr   r   r   r   r   r   r  r   r  r  skip_under_xdistr  r   fail_on_latin1_encoded_filenamesr#  r/  classmethodr*  r;  rB  rG  rK  rP  rh  skipifrn  r   r   r8   r)   ra   ra      s   ^^D! "062 2$	$((0
%

,
N$ ![[X~':':'<=)* > !)*V$2L
&**58&6P - -8 / /@ !3 !3F . .< &2 &2< %2 & 2<   &6  &6>5M@#8 [[X':'?'?'AB. C.8,0 #&J [[PQ Rr8   ra   c                      [         R                  R                  S5      u  n U R                  5       n[	        US5      (       d   eg)a  
When _default_revctrl was removed from the `setuptools.command.sdist`
module in 10.0, it broke some systems which keep an old install of
setuptools (Distribute) around. Those old versions require that the
setuptools package continue to implement that interface, so this
function provides that interface, stubbed. See #320 for details.

This interface must be maintained until Ubuntu 12.04 is no longer
supported (by Setuptools).
zg
        [setuptools.file_finders]
        svn_cvs = setuptools.command.sdist:_default_revctrl
        __iter__N)r	   EntryPoints
_from_textloadhasattr)epress     r)   test_default_revctrlr  J  sA       ++	ER '')C3
####r8   c                       \ rS rSrSr\S 5       r\R                  R                  SS5      S 5       r
\S 5       r\R                  R                  SS5      S	 5       rS
rg)TestRegressionsi_  zd
Can be removed/changed if the project decides to change how it handles symlinks
or external files.
c                 8    SSS00[        SU< S35      SSS.S.$ )	Ndirfile.hr   [  
                    from setuptools import Extension, setup
                    setup(
                        name="myproj",
                        version="42",
                        ext_modules=[
                            Extension(
                                "hello", sources=["hello.pyx"],
                                depends=[e]
                            )
                        ],
                    )
                    global-include *.hrf   z	hello.pyxr   externalprojectr   )tmp_pathdep_paths     r)   &files_for_symlink_in_extension_depends6TestRegressions.files_for_symlink_in_extension_dependse  sI     "~ %* +3 6  3#	
 	
r8   r  )zmyheaders/dir/file.hzmyheaders/dir/../dir/file.hc                     U R                  X#5      n[        R                  R                  U[	        U5      S9  [        US-  US-  5        [        XS-  5      nS H
  nXe;   a  M
   e   g )Nprefixr  zproject/myheadersr  )zmyproj-42/hello.pyxzmyproj-42/myheaders/dir/file.h)r  jaracor6   rT  r0   r_   	run_sdist)rq   monkeypatchr  r  rz   membersexpecteds          r)   !test_symlink_in_extension_depends1TestRegressions.test_symlink_in_extension_depends  so    
 ;;HO%H6X
2H?R4RS KI)=>
H &&&	
r8   c                     UR                  S5      u  p#nU(       a  X-  OUnSSS00[        S[        U5      < S35      SSS.S	.$ )
Nz$tmp_path$/r  r  r   r  r  r  r  r  )rA  r   r0   )r  r  headrE  tails        r)   ,files_for_external_path_in_extension_depends<TestRegressions.files_for_external_path_in_extension_depends  sm     **=9&*8? "~ %* +.h-): ;  3#	
 	
r8   )z$tmp_path$/external/dir/file.hz../external/dir/file.hc                     U R                  X#5      n[        R                  R                  U[	        U5      S9  [        XS-  5      nU H  nSU;  a  M   e   g )Nr  r  r  )r  r  r6   rT  r0   r  )rq   r  r  r  rz   r  r   s          r)   'test_external_path_in_extension_depends7TestRegressions.test_external_path_in_extension_depends  sV    
 AA(U%H6KI)=>D4''' r8   r   N)r   r   r   r   r   staticmethodr  r[   rr  rs  r  r  r  r   r   r8   r)   r  r  _  s    
 
 
4 [[K'' 
 
: [[P((r8   r  c                 f   U R                  U5        [        5          [        SS/5        SSS5        [        US-  R	                  S5      5      n[
        R                  " [        U5      5       n[        UR                  5       5      sSSS5        $ ! , (       d  f       Nm= f! , (       d  f       g= f)z@Given a project directory, run the sdist and return its contentsrf   r   Nr   z*.tar.gz)
chdirr*   r   nextglobtarfilerC   r0   setgetnames)r  r  archivetars       r)   r  r    s{    g	*wi( 
 Gf$**:67G	c'l	#s3<<>" 
$	#	 
 
$	#s   B.B"
B"
B0c                     [         R                  " U 5       nUR                  5       nS S S 5        W Vs/ sH  nSU;   d  M  UPM     nn[        U5      S:X  d
   SU 35       eg ! , (       d  f       NA= fs  snf )Nz.toxr   z
not empty )r  rC   r  r   )setuptools_sdistr  rz   r   	tox_filess        r)   &test_sanity_check_setuptools_own_sdistr    sh    	&	'3 
( #(:%$6T>%I:y>Q8*YK 88 
(	' ;s   A#	A4A4#
A1)Cr   
contextlibr%   r   r2   rm  r"   r  rJ   r<   inspectr   r   unittestr   jaraco.pathr  r[   rS   r   r   setuptools._importlibr	   setuptools.command.egg_infor
   setuptools.command.sdistr   setuptools.distr   setuptools.extensionr   setuptools.testsr   textr   	distutilsdistutils.corer   r6   r{   r   rn   r   r   r   ro   contextmanagerr*   r7   r@   rG   rQ   rr  xfailrv  rx  ru  __package__
startswithrq  rV   r_   ra   r  r  r  r  r   r8   r)   <module>r     s     	  	  
         < * 6 * ( * *   $ !G9-RWW\\#w789:
  	 	WW\\,./WW\\,./	
 %%	(9(99  8 8)	
 $*;;#4#4M6 $5 $   ;;%%+( &   %kk00((66< 1  
C CL$*\( \(~#9r8   