+
    SBip                       R t ^ RIHt ^ RIt^ RIt^ RIt^ RIHt ^ RIH	t	 ^ RI
Ht ^ RIt^ RIHt ^ RIHt ^ RIt^ RIHt ^ R	IHt ^ R
IHtHtHt ^ RIHtHt ^ RIHt ^ RIH t H!t! ^ RI"H#t#H$t$ ^RI%H&t&H't' ]	! ](4      PR                  t*Rt+R t,R t-]P\                  P_                  R]'! ]*]+,          4      4      ]P\                  Pa                  R4      ]P\                  Pb                  R 4       4       4       t2Rt3Rt4Rt5Rt6Rt7R]33R lt8R t9]P\                  P_                  RJ. RKO4      R 4       t:R t;R  t<]P\                  P_                  RL]Pz                  ! ]3R!R"R#7      ]Pz                  ! ]4R$]P\                  P}                  R%R&R'7      R(R)7      34      R* 4       t?]P\                  P_                  RM]Pz                  ! ]6R+RR,R-R.]P\                  Pa                  R/4      .R07      ]Pz                  ! ]7RR1R2R3R4R#7      34      R5 4       t@R6 tAR7 tB ! R8 R94      tC ! R: R;4      tD ! R< R=4      tE ! R> R?4      tF ! R@ RA4      tG ! RB RC4      tH ! RD RE4      tI ! RF RG4      tJRH RI ltKR# )NzMake sure that applying the configuration from pyproject.toml is equivalent to
applying a similar configuration from setup.cfg

To run these tests offline, please have a look on ``./downloads/preload.py``
)annotationsN)cleandoc)Path)Mock)LiteTranslator)Metadata)	is_static)write_requirements)expandpyprojecttomlsetupcfg)_MissingDynamic_some_attrgetterDistribution)InvalidConfigErrorRemovedConfigError)InformationOnlySetuptoolsDeprecationWarning)retrieve_fileurls_from_filezsetupcfg_examples.txtc                     \        R V /VC4      # )src_rootr   )pathattrss   &,U/usr/lib/python3.14/site-packages/setuptools/tests/config/test_apply_pyprojecttoml.pymakedistr   #   s    T3U344    c           
         V  Uu. uF5  p\         P                  ! RRV\         P                  R7      ;'       g    RNK7  	  up# u upi )zx
Allow comparing the given patterns for 2 dist objects.
We need to strip special chars to avoid errors when validating.
z
[^a-z0-9]+ )flagsempty)resubI)patterns___ps   &*, r   _mock_expand_patternsr)   '   s<    
 IQQ1BFF<Qbdd3>>w>QQQs
   3AAurlignorec           	     f	   VP                  \        R \        RR7      4       VP                  \        R\        \        R7      4       \        V 4      p\        VR4      pVP                  RR7      p\        4       P                  VR4      pVP                  VRR7       \        P                  ! \        V4      V4      p\        P                  ! \        V4      V4      p\        V4      p	\        V4      p
W8X  g   Q h\         ;QJ d    R	 Wx3 4       F  '       g   K   R
M	  RM! R	 Wx3 4       4      '       d0   \#        VP$                  4      \#        VP$                  4      8X  g   Q h\         ;QJ d    R Wx3 4       F  '       g   K   R
M	  RM! R Wx3 4       4      '       d   \'        VP(                  4       VP(                  P+                  4        UUu0 uF  w  rV.\-        R V 4       4      O5kK  	  pppVP(                  P+                  4        UUu0 uF  w  rV.\-        R V 4       4      O5kK  	  pppW8X  g   Q h\         ;QJ d    R Wx3 4       F  '       g   K   R
M	  RM! R Wx3 4       4      '       d~   VP.                  P+                  4        UUu0 uF  w  rV.\-        V4      O5kK  	  pppVP.                  P+                  4        UUu0 uF  w  rV.\-        V4      O5kK  	  pppVV8X  g   Q h\         ;QJ d    R Wx3 4       F  '       g   K   R
M	  RM! R Wx3 4       4      '       db   VP0                   UUu0 uF  w  rV.\-        V4      O5kK  	  pppVP0                   UUu0 uF  w  rV.\-        V4      O5kK  	  pppVV8X  g   Q h\#        VP2                  4      \#        VP2                  4      8X  g   Q h\         ;QJ d    R Wx3 4       F  '       g   K   R
M	  RM! R Wx3 4       4      '       d   VP4                  P+                  4        UUu0 uF  w  rV.\-        V4      O5kK  	  pppVP4                  P+                  4        UUu0 uF  w  rV.\-        V4      O5kK  	  pppVV8X  g   Q hR# R# u uppi u uppi u uppi u uppi u uppi u uppi u uppi u uppi )	read_attrz0.0.1)return_value_expand_patterns)side_effectpyproject.tomlutf-8encodingz	setup.cfgc              3  <   "   T F  p\        VR R4      x  K  	  R# 5i)license_filesNgetattr.0ds   & r   	<genexpr>>test_apply_pyproject_equivalent_to_setupcfg.<locals>.<genexpr>D   s     
L6K71ot,,6K   TFc              3  <   "   T F  p\        VR R4      x  K  	  R# 5i)entry_pointsNr7   r9   s   & r   r<   r=   G        
K5J71nd++5Jr>   c              3  D   "   T F  qP                  R R4      x  K  	  R# 5i r   Nreplacer:   is   & r   r<   r=   J        6Aq		#r**A    c              3  D   "   T F  qP                  R R4      x  K  	  R# 5irC   rE   rG   s   & r   r<   r=   N   rI   rJ   c              3  <   "   T F  p\        VR R4      x  K  	  R# 5i)package_dataNr7   r9   s   & r   r<   r=   S   rA   r>   c              3  <   "   T F  p\        VR R4      x  K  	  R# 5i)
data_filesNr7   r9   s   & r   r<   r=   X   s     
I3Ha71lD))3Hr>   c              3  <   "   T F  p\        VR R4      x  K  	  R# 5i)extras_requireNr7   r9   s   & r   r<   r=   ^   s     
M7L!71&--7Lr>   N)setattrr
   r   r   r)   r   r   	read_textr   	translate
write_textr   apply_configurationr   r   core_metadataanysetr6   printr@   itemssortedrM   rO   install_requiresrQ   )r*   monkeypatchtmp_pathsetupcfg_examplepyproject_examplesetupcfg_texttoml_config	dist_tomldist_cfgpkg_info_tomlpkg_info_cfgkvep_tomlep_cfgpkg_data_tomlpkg_data_cfgdata_files_tomldata_files_cfgextra_req_tomlextra_req_cfgs   &&&                  r   +test_apply_pyproject_equivalent_to_setupcfgrr   /   s    Tw-GH($;P*Q %S)X'78$...@M ",,]KHK  w ?11(82DFWXI++HX,>@PQH!),M *L(((
s
Ly6K
Lsss
Ly6K
LLL9**+s83I3I/JJJJ
s
Ki5J
Ksss
Ki5J
KKKh##$ "..446
6 76A6676 	 
 !--335
5 76A6675 	 
    
s
Ki5J
Ksss
Ki5J
KKK5>5K5K5Q5Q5ST5STQ!fQi5ST4<4I4I4O4O4QR4QDAVAY4QR,,,
s
II3H
Isss
II3H
III7@7K7KL7KtqA?q	?7KL6>6I6IJ6Ida1/vay/6IJ.000y))*c(2K2K.LLLL
s
M	7L
Msss
M	7L
MMM6?6N6N6T6T6VW6Vda1/vay/6VW5=5L5L5R5R5TU5TTQ!fQi5TU... N+

 UR MJ
 XUs0   !R!R	RRR1R!R'R-u  [project]
name = "spam"
version = "2020.0.0"
description = "Lovely Spam! Wonderful Spam!"
readme = "README.rst"
requires-python = ">=3.8"
license-files = ["LICENSE.txt"]  # Updated to be PEP 639 compliant
keywords = ["egg", "bacon", "sausage", "tomatoes", "Lobster Thermidor"]
authors = [
  {email = "hi@pradyunsg.me"},
  {name = "Tzu-Ping Chung"}
]
maintainers = [
  {name = "Brett Cannon", email = "brett@python.org"},
  {name = "John X. Ãørçeč", email = "john@utf8.org"},
  {name = "Γαμα קּ 東", email = "gama@utf8.org"},
]
classifiers = [
  "Development Status :: 4 - Beta",
  "Programming Language :: Python"
]

dependencies = [
  "httpx",
  "gidgethub[httpx]>4.0.0",
  "django>2.1; os_name != 'nt'",
  "django>2.0; os_name == 'nt'"
]

[project.optional-dependencies]
test = [
  "pytest < 5.0.0",
  "pytest-cov[all]"
]

[project.urls]
homepage = "http://example.com"
documentation = "http://readthedocs.org"
repository = "http://github.com"
changelog = "http://github.com/me/spam/blob/master/CHANGELOG.md"

[project.scripts]
spam-cli = "spam:main_cli"

[project.gui-scripts]
spam-gui = "spam:main_gui"

[project.entry-points."spam.magical"]
tomatoes = "spam:main_tomatoes"
u   [project]
name = "spam"
version = "2020.0.0"
authors = [
  {email = "hi@pradyunsg.me"},
  {name = "Tzu-Ping Chung"}
]
maintainers = [
  {name = "Степан Бандера", email = "криївка@оун-упа.укр"},
]
zE
def main_cli(): pass
def main_gui(): pass
def main_tomatoes(): pass
z[project]
name = "spam"
version = "2020.0.0"
authors = [
  {email = "hi@pradyunsg.me"},
  {name = "Tzu-Ping Chung"}
]
license = {text = "MIT"}
a#  [project]
name = "spam"
version = "2020.0.0"
authors = [
  {email = "hi@pradyunsg.me"},
  {name = "Tzu-Ping Chung"}
]
license = "mit or apache-2.0"  # should be normalized in metadata
classifiers = [
    "Development Status :: 5 - Production/Stable",
    "Programming Language :: Python",
]
z
README.rstc                H   V R ,          pTpRRV R2/pVP                  4        F  w  rgVP                  Wg4      pK  	  VP                  VRR7       W,          P                  RRR7       V R,          P                  RRR7       V R	,          P                  \        RR7       V# )
r1   zreadme = "README.rst"z
readme = ""r2   r3   zhello worldLICENSE.txt--- LICENSE stub ---zspam.py)r[   rF   rU   PEP621_EXAMPLE_SCRIPT)r_   readmepyproject_text	pyprojecttextreplacementsorigsubsts   &&&     r   _pep621_example_projectr      s    
 ++ID+z&-CDL#))+||D( ,0""=7"C))*@7)S	%%&;g%Nr   c                    \        V 4      p\        P                  ! \        V 4      V4      p\	        VP
                  P                  4      R08X  g   Q hR# )z&Make sure the example in PEP 621 worksru   N)r   r   rV   r   rY   metadatar6   r_   rz   dists   &  r   test_pep621_exampler      sB    '1I,,Xh-?KDt}}**+>>>r   c                    \        W4      p\        P                  ! \        V 4      V4      pVP                  P
                  V8X  g   Q hR # Nr   r   rV   r   r   long_description_content_type)r_   rx   ctyperz   r   s   &&&  r   test_readme_content_typer      s=     (9I,,Xh-?KD==66%???r   c                    \        V R 4      p\        P                  ! \        RR7      ;_uu_ 4        \        P
                  ! \        V 4      V4       RRR4       R#   + '       g   i     R# ; i)z
README.texz%Undefined content type for README.texmatchN)r   pytestraises
ValueErrorr   rV   r   )r_   rz   s   & r   test_undefined_content_typer      sE    ',?I	z)P	Q	Q))(8*<iH 
R	Q	Q	Qs   !AA-	c                    \        V R 4      p\        P                  ! \        V 4      V4      pVP                  P
                  e   Q hR# )READMENr   r   s   &  r   3test_no_explicit_content_type_for_missing_extensionr      s;    '(;I,,Xh-?KD==66>>>r   ug   Brett Cannon <brett@python.org>, "John X. Ãørçeč" <john@utf8.org>, Γαμα קּ 東 <gama@utf8.org>znon-international-emails)iduA   Степан Бандера <криївка@оун-упа.укр>zlCPython's `email.headerregistry.Address` only supports RFC 5322, as of Nov 10, 2022 and latest Python 3.11.0T)reasonstrictzinternational-email)marksr   c                   \        VR VR7      p\        P                  ! \        V4      V4      pVP                  P
                  V 8X  g   Q hVR,          p\        VRRR7      ;_uu_ 4       pVP                  P                  V4       RRR4       VP                  RR7      pRV  2V9   g   Q hR#   + '       g   i     L0; i)r   ry   PKG-FILEwr2   r3   NzMaintainer-email: )	r   r   rV   r   r   maintainer_emailopenwrite_pkg_filerS   )expected_maintainers_meta_valuery   r_   rz   r   pkg_filefhcontents   &&&     r    test_utf8_maintainer_in_metadatar      s    8 (%I
 ,,Xh-?KD==))-LLLL*$H	hg	.	."$$R( 
/  ' 2G ?@AWLLL 
/	.s   +B//B?	MITzLicense: MITzLicense-Expression: zlicense-textz6ignore:.project.license. as a TOML table is deprecated)r   r   zMIT OR Apache-2.0z%License-Expression: MIT OR Apache-2.0z	License: zlicense-expressionc                   \        VR VR7      p\        P                  ! \        V4      V4      pVP                  P
                  V 8X  g   Q hVP                  P                  V8X  g   Q hVR,          p\        VRRR7      ;_uu_ 4       p	VP                  P                  V	4       RRR4       VP                  RR7      p
RV
9   g   Q hW*9   g   Q hW:9  g   Q hR#   + '       g   i     L=; i)r   r   r   r   r2   r3   NzMetadata-Version: 2.4)
r   r   rV   r   r   licenselicense_expressionr   r   rS   )r   r   content_strnot_content_strry   r_   rz   r   r   r   r   s   &&&&&&     r   test_license_in_metadatar   #  s    P (%I
 ,,Xh-?KD==  G+++==++/AAAA*$H	hg	.	."$$R( 
/  ' 2G"g---!!!))) 
/	.s   CC)	c                \   \         P                  R ^4      ^ ,          p\        V RV R24      pRp\        P                  ! \
        VR7      ;_uu_ 4       p\        P                  ! \        V 4      V4       RRR4       R\        XP                  4      9   g   Q hR#   + '       g   i     L.; i)
r   z/
    "License :: OSI Approved :: MIT License"
]z?License classifiers have been superseded by license expressionsr   N&License :: OSI Approved :: MIT License)PEP639_LICENSE_EXPRESSIONrsplitr   r   r   r   r   rV   r   strvalue)r_   r{   rz   msgexcs   &    r   /test_license_classifier_with_license_expressionr   \  s    $++D!4Q7D'&CDI
 LC	)	5	5))(8*<iH 
6 4s399~EEE 
6	5s   !BB+	c           	        R p\        V RV4      pRpRp\        P                  ! \        VR7      ;_uu_ 4        \        P                  ! \        VR7      ;_uu_ 4        \        P
                  ! \        V 4      V4      pRRR4       RRR4       XP                  P                  4       R.8X  g   Q hR#   + '       g   i     L<; i  + '       g   i     LG; i)z    [project]
    name = "spam"
    version = "2020.0.0"
    license = {text = "mit or apache-2.0"}
    classifiers = ["License :: OSI Approved :: MIT License"]
    r   z5License classifiers are deprecated(?:.|
)*MIT License/.project.license. as a TOML table is deprecatedr   Nr   )	r   r   warnsr   r   rV   r   r   get_classifiers)r_   r{   rz   msg1msg2r   s   &     r   2test_license_classifier_without_license_expressionr   j  s    D ((DAICD<D1>>1>>00(1CYO 	? 	? ==((*/W.XXXX 	?> 	?>s#   %C!B2	>C2C=CC	c                  N    ] tR tRtRR ltRR ltR tR tR tR t	R t
R	 tR
tR# )TestLicenseFilesi  c                	    \         pR V9   g   Q hRV9  g   Q hRV9  g   Q h\        P                  ! RVV^R7      pW49   g   Q hV RV R2p\        VRVR7      pV# )zlicense = "mit or apache-2.0"zlicense-filesz[tool.setuptools]z(license = .*)\n)countr   r   r   )r   r"   r#   r   )selfr_   additional_textlicense_tomlr{   rz   s   &&&&  r   base_pyprojectTestLicenseFiles.base_pyproject  s     ) /$666d***"$...vv	
 ###r/*"-+HhtT	r   c                	*    V P                  VVR R7      # )z>license = "licenseref-Proprietary"
license-files = ["_FILE*"]
)r   r   )r   )r   r_   r   s   &&&r   base_pyproject_license_pep639.TestLicenseFiles.base_pyproject_license_pep639  s%    ""+- # 
 	
r   c           	     	   R pV P                  W4      pVR,          P                  4        VR,          P                  4        VR,          pVP                  RRR7       RpRp\        P                  ! \
        VR	7      ;_uu_ 4        \        P                  ! \
        VR	7      ;_uu_ 4        \        P                  ! \        V4      V4      pR
R
R
4       R
R
R
4       \        XP                  P                  4      RR08X  g   Q hVP                  P                  R8X  g   Q hR
#   + '       g   i     L_; i  + '       g   i     Lj; i),[tool.setuptools]
license-files = ["_FILE*"]	_FILE.txt	_FILE.rstru   zLicenseRef-Proprietary
r2   r3   zQ'tool.setuptools.license-files' is deprecated in favor of 'project.license-files'r   r   N)r   touchrU   r   r   r   r   rV   r   rY   r   r6   r   )r   r_   setuptools_configrz   r   r   r   r   s   &&      r   +test_both_license_and_license_files_defined<TestLicenseFiles.test_both_license_and_license_files_defined  s    K''D		K	&&(	K	&&( ]*5Hb@LL5TBBLL5TBB 44Xh5GSD C C 4==../K3MMMM}}$$(BBBB	 CB CBs$   %D6+!D#	D6#D3.D66E	c                	   V P                  V4      pVR ,          P                  4        VR,          P                  4        Rp\        P                  ! \        VR7      ;_uu_ 4        \
        P                  ! \        V4      V4      pRRR4       \        XP                  P                  4      RR 08X  g   Q hVP                  P                  e   Q hVP                  P                  R8X  g   Q hR#   + '       g   i     Lq; i)r   r   zNormalizing.*LicenseRefr   NzLicenseRef-Proprietary)r   r   r   r   r   r   rV   r   rY   r   r6   r   r   )r   r_   rz   r   r   s   &&   r   2test_both_license_and_license_files_defined_pep639CTestLicenseFiles.test_both_license_and_license_files_defined_pep639  s    66x@		K	&&(	K	&&('\\/55 44Xh5GSD 6 4==../K3MMMM}}$$,,,}}//3KKKK 65s   &!C00D 	c                	    R pV P                  W4      pRp\        P                  ! \        VR7      ;_uu_ 4        \        P
                  ! \        V4      V4       RRR4       R#   + '       g   i     R# ; i)r   zR'project.license-files' is defined already. Remove 'tool.setuptools.license-files'r   N)r   r   r   r   r   rV   r   )r   r_   r   rz   r   s   &&   r    test_license_files_defined_twice1TestLicenseFiles.test_license_files_defined_twice  sS    K66xS	b]]-S99--hx.@)L :999s   !A%%A6	c                	l   R pV P                  WRR7      pRP                  4       pV F  pW,          P                  V R2RR7       K!  	  \        P                  ! \        V4      V4      pVR,          P                  4       '       g   Q h\        VP                  P                  4      0 VmRk8X  g   Q hR# )	z"[tool.setuptools]
zip-safe = falser   )r   z5LICENCE-a.html COPYING-abc.txt AUTHORS-xyz NOTICE,defr   r2   r3   ru   N)
r   splitrU   r   rV   r   existsrY   r   r6   )r   r_   r   rz   r6   fnamer   s   &&     r   test_default_patterns&TestLicenseFiles.test_default_patterns  s    A''RT'U	OUUW"E))UG2,)I # 00(1CYO=(0022224==../3R]3RM3RRRRr   c           	     	   V P                  V4      p\        VP                  R 4      4      . 8X  g   Q hRpRp\        P                  ! \
        VR7      ;_uu_ 4        \        P                  ! \        VR7      ;_uu_ 4        \        P                  ! \        V4      V4       RRR4       RRR4       R#   + '       g   i     L; i  + '       g   i     R# ; i)z_FILE*z-Cannot find any files for the given pattern.*z@Normalizing 'licenseref-Proprietary' to 'LicenseRef-Proprietary'r   N)
r   listglobr   r   r   r   r   rV   r   )r   r_   rz   r   r   s   &&   r   test_missing_patterns&TestLicenseFiles.test_missing_patterns  s    66x@	HMM(+,222>QLL5TBBLL55--hx.@)L 6 CB55 CBBs$   %C !B3	!C3C>CC	c                   R\         9   g   Q h\         P                  RR4      p\        WR7      pRp\        P                  ! \
        VR7      ;_uu_ 4        \        P                  ! \        V4      V4      pRRR4       XP                  P                  R8X  g   Q h\        VP                  P                  4      R08X  g   Q hR#   + '       g   i     LV; i)	z?Make sure the old example with ``license = {text = ...}`` workszlicense-files = ["LICENSE.txt"]z license = {file = "LICENSE.txt"}r   r   r   Nrv   ru   )PEP621_EXAMPLErF   r   r   r   r   r   rV   r   r   r   rY   r6   )r   r_   r{   rz   r   r   s   &&    r   $test_deprecated_file_expands_to_text5TestLicenseFiles.test_deprecated_file_expands_to_text  s     1NBBB%%-.
 ,HJ	?\\6cBB 44Xh5GSD C }}$$(>>>>4==../M?BBB	 CBs   !CC	 N)r   z!license = {file = "LICENSE.txt"}
r   )__name__
__module____qualname____firstlineno__r   r   r   r   r   r   r   r   __static_attributes__r   r   r   r   r     s0    0
C,LMS
MCr   r   c                      ] tR tRtR t]P                  P                  RRR.4      R 4       t]P                  P                  R. R
O4      R 4       t	Rt
R	# )TestPyModulesi  c                	    R V: R2p\        R4      pVP                  \        V4      RR7       \        P                  ! \        / 4      V4      # )zr
        [project]
        name = "test"
        version = "42.0"
        [tool.setuptools]
        py-modules = [z
]
        r1   r2   r3   )r   rU   r   r   rV   r   )r   namerc   rz   s   &&  r   r   TestPyModules.dist  sW    
 h 	 )*	Xk2WE00b1A9MMr   modulezpip-runu   abc-d.λ-xyz-ec                	j    VP                  V4       W0P                  V4      P                  9   g   Q hR # r   )chdirr   
py_modulesr   r_   r^   r   s   &&&&r   test_valid_module_name$TestPyModules.test_valid_module_name  s+    (#6*55555r   c                	    VP                  V4       \        P                  ! \        R R7      ;_uu_ 4        V P	                  V4      P
                   RRR4       R#   + '       g   i     R# ; i)z
py-modulesr   N)r   r   r   r   r   r   r   s   &&&&r   test_invalid_module_name&TestPyModules.test_invalid_module_name  sB    (#]]:\::IIf(( ;:::s   AA-	r   N)zpip runz-pip-runzpip-run-stubs)r   r   r   r   r   r   markparametrizer   r   r   r   r   r   r   r     s[    
N [[X	3C'DE6 F6 [[X'OP) Q)r   r   c                      ] tR tRtR tRtR# )TestExtModulesi  c                	(   VP                  V4       \        R 4      pRpVP                  \        V4      RR7       \        P
                  ! \        P                  4      ;_uu_ 4        \        P                  ! \        / 4      V4      pRRR4       \        XP                  4      ^8X  g   Q hVP                  ^ ,          P                  R8X  g   Q h\        VP                  ^ ,          P                  4      RR08X  g   Q hR#   + '       g   i     L; i)r1   z
        [project]
        name = "test"
        version = "42.0"
        [tool.setuptools]
        ext-modules = [
          {name = "my.ext", sources = ["hello.c", "world.c"]}
        ]
        r2   r3   Nzmy.extzhello.czworld.c)r   r   rU   r   r   r   r   _ExperimentalConfigurationrV   r   lenext_modulesr   rY   sources)r   r_   r^   rz   rc   r   s   &&&   r   test_pyproject_sets_attribute,TestExtModules.test_pyproject_sets_attribute  s    (#)*	 	Xk2WE\\-BBCC 44\"5EyQD D4##$)))"''83334##A&../Iy3IIII	 DCs   '!DD	r   N)r   r   r   r   r  r   r   r   r   r   r     s    Jr   r   c                      ] tR tRtR tRtR# )TestDeprecatedFieldsi,  c                	   VR ,          pRpVP                  \        V4      RR7       \        P                  ! \        RR7      ;_uu_ 4        \
        P                  ! \        V4      V4       RRR4       R#   + '       g   i     R# ; i)r1   z
        [project]
        name = "myproj"
        version = "42"
        [tool.setuptools]
        namespace-packages = ["myproj.pkg"]
        r2   r3   znamespace-packagesr   N)rU   r   r   r   r   r   rV   r   )r   r_   rz   configs   &&  r   test_namespace_packages,TestDeprecatedFields.test_namespace_packages-  sf    //	 	Xf-@]]-5IJJ--hx.@)L KJJJs   !A77B	r   N)r   r   r   r   r  r   r   r   r   r  r  ,  s    Mr   r  c                  @   ] tR tRtRR lt]P                  P                  RR]P                  ! R R]P                  P                  R4      ./ RRR.3RRR	R
./3RRRR./3]P                  ! RRR.3R]P                  P                  R4      ./ .4      R 4       t
]P                  P                  RRRR. 3RR/ 3RRR.3RRR.3.4      R 4       tR tR tR t]P                  P                  R!R"R#.4      ]P                  P                  R4      R 4       4       tRtR# )$TestPresetFieldi;  c                	x    R V: R2pRV9  d
   VR,          pVR,          pVP                  WC,           RR7       V# )z"[project]
name = 'proj'
dynamic = r   versionzversion = '42'
r1   r2   r3   )rU   )r   r_   dynamicextra_contentr   files   &&&&  r   rz   TestPresetField.pyproject<  sF    82FG#))G**/'Br   r   zignore:.*license. overwrittenclassifierszPrivate :: Classifierr@   scriptsconsole_scriptsfoobar=foobar:maingui-scriptsgui_scriptszbazquux=bazquux:mainr]   dependenciessixz&ignore:.*install_requires. overwrittenc                ~   V P                  V. 4      p\        V3/ W$/B p\        P                  ! RV 2\        P                  4      p\
        P                  ! \        VR7      ;_uu_ 4        \        P                  ! We4      pRRR4       \        RV 2V4      ! V4      pV'       d   Q hR#   + '       g   i     L1; i)z:Setuptools cannot set a field if not listed in ``dynamic``z&defined outside of `pyproject.toml`:.*r   N	metadata.)rz   r   r"   compileSr   r   r   r   rV   r   )	r   r_   attrfieldr   rz   r   r   
dist_values	   &&&&&    r   test_not_listed_in_dynamic*TestPresetField.test_not_listed_in_dynamicD  s    * NN8R0	2TM2jjA%I244P\\/55 44TED 6 &	$&8$?E
~:	 65s   ,B,,B<	rQ   zoptional-dependenciesc                	    V P                  W.4      p\        V3/ W$/B p\        P                  ! We4      p\	        R V 2V4      ! V4      pWt8X  g   Q hR# )r  N)rz   r   r   rV   r   )r   r_   r!  r"  r   rz   r   r#  s   &&&&&   r   test_listed_in_dynamic&TestPresetField.test_listed_in_dynamicb  sY     NN8W5	2TM200A%	$&8$?E
"""r   c                   VP                  V4       V P                  V. 4      p\        VR.R7      pVR,          P                  RRR7       \        P
                  ! WC4      pVP                  P                  R.8X  g   Q hR# )a(  
license-file is currently not considered in the context of dynamic.
As per 2025-02-19, https://packaging.python.org/en/latest/specifications/pyproject-toml/#license-files
allows setuptools to fill-in `license-files` the way it sees fit:

> If the license-files key is not defined, tools can decide how to handle license files.
> For example they can choose not to include any files or use their own
> logic to discover the appropriate files in the distribution.

Using license_files from setup.py to fill-in the value is in accordance
with this rule.
zLIC*)r6   LIC142r2   r3   N)r   rz   r   rU   r   rV   r   r6   )r   r^   r_   rz   r   s   &&&  r   &test_license_files_exempt_from_dynamic6TestPresetField.test_license_files_exempt_from_dynamics  sr     	(#NN8R0	9	F	&&tg&>00A}}**vh666r   c                	&   R pVR,          pVP                  VRR7       \        VR.R7      p\        P                  ! RR7      ;_uu_ 4        \        P
                  ! WC4      pRRR4       RVP                  9  g   Q hR#   + '       g   i     L%; i)	z:[project]
name='pkg'
version='0.1'
dependencies=['click']
r1   r2   r3   wheelr]   z`install_requires` overwrittenr   N)rU   r   r   r   r   rV   r]   )r   r_   srcrz   r   s   &&   r   %test_warning_overwritten_dependencies5TestPresetField.test_warning_overwritten_dependencies  sw    N//	S73G9=\\ @AA 44TED Bd33333 BAs   B  B	c                R   RpV P                  VR.V4      pR.p\        WR7      p\        P                  ! WS4      pRVP                  9   g   Q hVP                  R4      p\        WaVR,          4       VR,          P                  RR	7      pR
V9   g   Q hRV9   g   Q hRV9   g   Q hR# )z
Internally setuptools converts dependencies with markers to "extras".
If ``install_requires`` is given by ``setup.py``, we have to ensure that
applying ``optional-dependencies`` does not overwrite the mandatory
dependencies with markers (see #3204).
z1
[project.optional-dependencies]
foo = ['bar>1']
r  z6importlib-resources (>=3.0.0) ; python_version < "3.7"r0  fooegg_infozrequires.txtr2   r3   zimportlib-resourcesbarz:python_version < "3.7"N)rz   r   r   rV   rQ   get_command_objr	   rS   )r   r_   extrarz   install_reqr   r6  reqss   &&      r   2test_optional_dependencies_dont_remove_env_markersBTestPresetField.test_optional_dependencies_dont_remove_env_markers  s     GNN8n-=uE	OP?00A+++++''
38x./HI>)44g4F$,,,}}(D000r   errorc                	    V P                  W.4      p\        WR ./R7      p\        P                  ! WT4      pW5P                  9   g   Q hR# )r  )r@   N)rz   r   r   rV   r@   )r   r_   r"  grouprz   r   s   &&&&  r   .test_scripts_dont_require_dynamic_entry_points>TestPresetField.test_scripts_dont_require_dynamic_entry_points  sI     NN8W5	8L7M/NO00A)))))r   r   Nr   )r!  r"  r   )r   r   r   )r   r   zNot SPDX)r"  r@  )r  r  )r  r  )r   r   r   r   rz   r   r   r   paramfilterwarningsr$  r'  r,  r2  r<  rA  r   r   r   r   r  r  ;  s    [["4LL3{{112QRS M,C+DEY):=Q<R(ST]]=S<T,UVLL$nug> KK../WX	
&	'&	 [["446;%9M,C+DE	
	#	#7(41, [[	')GH [[(* )	
*r   r  c                      ] tR tRtR tRtR# )TestMetai  c                .   \         P                  ! V4      ;_uu_ 4       p\        ;QJ d*    R VP                  4        4       F  '       g   K   RM	  RM! R VP                  4        4       4      '       g   Q h RRR4       R#   + '       g   i     R# ; i)z,Meta test to ensure tests can run from sdistc              3  J   "   T F  qP                  \        4      x  K  	  R # 5ir   )endswithEXAMPLES_FILE)r:   r   s   & r   r<   6TestMeta.test_example_file_in_sdist.<locals>.<genexpr>  s     O}}]33s   !#TFN)tarfiler   rX   getnames)r   setuptools_sdisttars   && r   test_example_file_in_sdist#TestMeta.test_example_file_in_sdist  sV    \\*++s3OO333OOOOOO ,+++s   +B(B6BB	r   N)r   r   r   r   rP  r   r   r   r   rF  rF    s    Pr   rF  c                      ] tR tRtR tRtR# )TestInteropCommandLineParsingi  c                	,   VP                  V4       R p\        VR4      pVP                  \        V4      RR7       RR./p\        P
                  ! \        V4      V4      pVP                  4        VP                  4       pRVP                  9   g   Q hR# )zJ
        [project]
        name = "test"
        version = "42.0"
        r1   r2   r3   script_argsz	--versionz42.0N)
r   r   rU   r   r   rV   r   parse_command_line
readouterrout)	r   r_   r^   capsysrc   rz   optsr   captureds	   &&&&     r   test_version*TestInteropCommandLineParsing.test_version  s     	(#
 #34	Xk2WE}-00d1CYO!$$&%%%r   r   N)r   r   r   r   r\  r   r   r   r   rS  rS    s    &r   rS  c                      ] tR tRtR tRtR# )TestStaticConfigi  c                	|   VP                  V4       R p\        VR4      pVP                  \        V4      RR7       \        P
                  ! \        / 4      V4      p\        VP                  4      '       g   Q h\        VP                  P                  4      '       g   Q h\        VP                  P                  4      '       g   Q h\        VP                  P                  4      '       g   Q h\        VP                  P                  4      '       g   Q h\        VP                  P                  4      '       g   Q hR# )a)  
        [project]
        name = "test"
        version = "42.0"
        dependencies = ["hello"]
        keywords = ["world"]
        classifiers = ["private :: hello world"]
        [tool.setuptools]
        obsoletes = ["abcd"]
        provides = ["abcd"]
        platforms = ["abcd"]
        r1   r2   r3   N)r   r   rU   r   r   rV   r   r   r]   r   keywordsr  	obsoletesprovides	platforms)r   r_   r^   rc   rz   r   s   &&&   r   test_mark_static_fields(TestStaticConfig.test_mark_static_fields  s    (# #34	Xk2WE00b1A9M..//////0000223333001111//0000001111r   r   N)r   r   r   r   re  r   r   r   r   r_  r_    s    2r   r_  c                   V ^8  d   QhRR/# )   returnr   r   )formats   "r   __annotate__rk    s      3 r   c                ,   \         P                  ! 4       ;_uu_ 4       pV P                  P                  V4       VP	                  4       pR R R 4       \
        P                  ! XRR7       Rp\        4       pVR,          pVR,          pVR,          pVP                  R4       . pVP                  4        F:  pVP                  V4      '       g   Wd9   d   K"  VP                  VR,           4       K<  	  RP                  V4      #   + '       g   i     L; i)	NT)validater   r   r   )zAuthor:zAuthor-email:zMaintainer:zMaintainer-email:)zProject-URL: Homepage,z
Home-page:)zDescription-Content-Type:)ioStringIOr   r   getvaluer   
from_emailrY   add
splitlines
startswithappendjoin)r   bufferpkg_file_txtskip_prefixes
skip_linesresultlines   &      r   rW   rW     s    	&$$V,( 

 t4%'MJ UUM==M33MNN2F'')??=))T-?dTk" *
 776?3 
s   ,DD	)rx   r   ))z
Readme.txtz
text/plain)z	readme.mdztext/markdown)ztext.rstz
text/x-rst)ry   r   )ry   r   r   r   r   )L__doc__
__future__r   rn  r"   rL  inspectr   pathlibr   unittest.mockr   r   ini2toml.apir   packaging.metadatar   
setuptoolssetuptools._staticr   setuptools.command.egg_infor	   setuptools.configr
   r   r   &setuptools.config._apply_pyprojecttomlr   r   setuptools.distr   setuptools.errorsr   r   setuptools.warningsr   r   	downloadsr   r   __file__parentHERErJ  r   r)   r   r   rD  uses_networkrr   r   "PEP621_INTERNATIONAL_EMAIL_EXAMPLErw   PEP639_LICENSE_TEXTr   r   r   r   r   r   rC  xfailr   r   r   r   r   r   r   r  r  rF  rS  r_  rW   r   r   r   <module>r     s   # 	 	      ' '  ( : = = T ( D M 4H~'5R tm/C DEH%//  & F//d2h& " 	  $ !$? @@I? 93 *	
 	.O++##H $ 
 %		
.M/.M&  	"**L	
 	%3#	
@*A@*2FY,yC yCx) )6J J*M Mu* u*pP P& &&2 2:r   