+
    SBi	                        ^ RI t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RI	H
t
 ^ RIHt ^ RIHtHt ^ RIHt ^ RIt^ RIHt ^ RIHt ^ RIHt ^R	IHt R
t]! ]P:                  ! RR4      4      tR]P>                  9   t ]PB                  PE                  ]PF                  R8H  ;'       d    ] RR7      t$ ! R R4      t% ! R R]%4      t& ! R R]%4      t'R]! R4      R]! R4      /R]! R4      R]! R4      /R]! R4      R]! R4      /R]! R4      /R]! R4      R]! R 4      /R]! R4      RR
R]! R 4      /.t( ! R! R"4      t) ! R# R$])4      t*]PB                  PW                  R%4      R& 4       t,R' t-R# )(    N)futures)Path)AnyCallable)ZipFile)path)Requirement)SetuptoolsDeprecationWarning)DALSz __import__('setuptools').setup()TIMEOUT_BACKEND_TEST180__pypy__win32z_The combination of PyPy + Windows + pytest-xdist + ProcessPoolExecutor is flaky and problematic)reasonc                   *   a  ] tR t^%t o RR ltRtV tR# )BuildBackendBaseNc                @    Wn         T;'       g    / V n        W0n        R # )N)cwdenvbackend_name)selfr   r   r   s   &&&&E/usr/lib/python3.14/site-packages/setuptools/tests/test_build_meta.py__init__BuildBackendBase.__init__&   s    99"(    )r   r   r   ).Nsetuptools.build_meta)__name__
__module____qualname____firstlineno__r   __static_attributes____classdictcell____classdict__s   @r   r   r   %   s     ) )r   r   c                   N   a a ] tR t^,t oRtV 3R ltV3R lR ltR tRtVt	V ;t
# )BuildBackendzPEP 517 Build Backendc                `   < \         SV `  ! V/ VB  \        P                  ! ^R7      V n        R# )   )max_workersN)superr   r   ProcessPoolExecutorpool)r   argskwargs	__class__s   &*,r   r   BuildBackend.__init__/   s'    $)&)//A>	r   c                :   < V ^8  d   QhRS[ RS[RS[3,          /# )   namereturn.)strr   r   )formatr%   s   "r   __annotate__BuildBackend.__annotate__3   s$       c(: r   c                   a a VV 3R lpV# )<Handles arbitrary function invocations on the build backend.c                    < \         P                  P                  SP                  4      p\	        VSP
                  SP                  4      pR p SP                  P                  \         P                  4      P                  \        4      pSP                  P                  ! VS.V O5/ VB P                  \        4      #   \        P                   dP    SP                  P                  RR7       SP                  T4       \         P"                  ! R\         R24        R # \        P$                  P&                  \(        \*        3 d%    \,        '       d   \         P"                  ! R4       h i ; i)NF)waitz(Backend did not respond before timeout (z s)z3PyPy frequently fails tests with ProcessPoolExector)osr   abspathr   BuildBackendCallerr   r   r-   submitgetpidresultTIMEOUTr   TimeoutErrorshutdown_killpytestxfailprocessBrokenProcessPoolMemoryErrorOSErrorIS_PYPY)r.   kwrootcallerpidr4   r   s   *,   r   method(BuildBackend.__getattr__.<locals>.method6   s   77??488,D'dhh8I8IJFC
ii&&ryy188Ayy''BtBrBII'RR'' V		""".

3GyPSTUOO55{GL 7LL!VWs    A/B? ?A E/"'E/
E/E/ )r   r4   rS   s   ff r   __getattr__BuildBackend.__getattr__3   s    	  r   c                .   Vf   R # \         P                  ! \        \        4      ;_uu_ 4        \        P
                  ! T\        P                  R8X  d   \        P                  M\        P                  4       R R R 4       R #   + '       g   i     R # ; i)Nnt)

contextlibsuppressProcessLookupErrorrM   r>   killr4   signalSIGTERMSIGKILL)r   rR   s   &&r   rG   BuildBackend._killH   sO    ;  !3W==GGC277d?O >===s   ABB	)r-   )r   r   r    r!   __doc__r   rV   rG   r"   r#   __classcell__r0   r%   s   @@r   r'   r'   ,   s#     ? *P Pr   r'   c                   8   a a ] tR t^Ot oV 3R ltR tRtVtV ;t# )r@   c                x   < \         SV `  ! V/ VB  V P                  P                  R 4      w  V n        q0n        R# ):N)r+   r   r   	partitionbackend_obj)r   r.   r/   _r0   s   &*, r   r   BuildBackendCaller.__init__P   s6    $)&)373D3D3N3Ns3S0	A/r   c                J   \         P                  ! V P                  4       \         P                  P	                  V P
                  4       \        P                  ! V P                  4      pV P                  '       d   \        W@P                  4      pMTp\        WQ4      ! V/ VB # )r;   )r>   chdirr   environupdater   	importlibimport_moduler   ri   getattr)r   r4   r.   rO   modbackends   &&*,  r   __call__BuildBackendCaller.__call__U   st    



$((#%%d&7&78c#3#34GGw%t2r22r   )r   ri   )	r   r   r    r!   r   ru   r"   r#   rc   rd   s   @@r   r@   r@   O   s     T
3 3r   r@   setup.pyz
            __import__('setuptools').setup(
                name='foo',
                version='0.0.0',
                py_modules=['hello'],
                setup_requires=['six'],
            )
            hello.pyC
            def run():
                print('hello')
            z
            assert __name__ == '__main__'
            __import__('setuptools').setup(
                name='foo',
                version='0.0.0',
                py_modules=['hello'],
                setup_requires=['six'],
            )
            aF  
            variable = True
            def function():
                return variable
            assert variable
            __import__('setuptools').setup(
                name='foo',
                version='0.0.0',
                py_modules=['hello'],
                setup_requires=['six'],
            )
            a  
            # Some packages construct files on the fly, include them in the package,
            # and immediately remove them after `setup()` (e.g. pybind11==2.9.1).
            # Therefore, we cannot use `distutils.core.run_setup(..., stop_after=...)`
            # to obtain a distribution object first, and then run the distutils
            # commands later, because these files will be removed in the meantime.

            with open('world.py', 'w', encoding="utf-8") as f:
                f.write('x = 42')

            try:
                __import__('setuptools').setup(
                    name='foo',
                    version='0.0.0',
                    py_modules=['world'],
                    setup_requires=['six'],
                )
            finally:
                # Some packages will clean temporary files
                __import__('os').unlink('world.py')
            	setup.cfgz
        [metadata]
        name = foo
        version = 0.0.0

        [options]
        py_modules=hello
        setup_requires=six
        z7
        def run():
            print('hello')
        c                   J  a  ] tR t^t o RtR t]P                  ! ]R7      R 4       t	R t
R tR t]P                  P                  RRF4      R	 4       t]P                  P                  R
R].4      R 4       tR tR tR tR tR tR tR tR tR tR tR]! R4      RRR]! R4      /tR tR]! R4      R R!R"R#///tR$ t R% t!R& t"]P                  P                  R'R(R)/.4      R* 4       t#]P                  P                  RGR+R,.3R-R,.3R.R,.3R/R,.3R0R,R1.3R2R,.3R3R,.3R4R5.3R6R,R1.3R7R,R1.3R8R,R1.3.4      ]P                  P                  R9R:R;.4      R< 4       4       t$R= t%R> t&R]! R?4      /t'R@ t(R]! RA4      /t)RB t*]P                  P                  RCRH4      RD 4       t+REt,V t-R# )ITestBuildMetaBackendr   c                .    \        V P                  R 7      # )r   )r'   r   )r   s   &r   get_build_backend&TestBuildMetaBackend.get_build_backend   s    ):):;;r   )paramsc              #     "   \         P                  ! VP                  \        V4      R 7       VP	                  4       ;_uu_ 4        V P                  4       x  RRR4       R#   + '       g   i     R# ; i5i))prefixN)r   buildparamr6   as_cwdr   )r   tmpdirrequests   &&&r   build_backend"TestBuildMetaBackend.build_backend   s@     

7==V5]]__((** ___s   AA7A#
A7#A4	.	A7c                b    VP                  4       pR .p\        V4      \        V4      8X  g   Q hR# sixN)get_requires_for_build_wheelsortedr   r   actualexpecteds   &&  r   !test_get_requires_for_build_wheel6TestBuildMetaBackend.test_get_requires_for_build_wheel   .    ;;=7f~!1111r   c                b    VP                  4       pR .p\        V4      \        V4      8X  g   Q hR# r   )get_requires_for_build_sdistr   r   s   &&  r   !test_get_requires_for_build_sdist6TestBuildMetaBackend.test_get_requires_for_build_sdist   r   r   c                   \         P                  P                  R 4      p\         P                  ! V4       VP	                  V4      p\         P                  P                  W#4      p\         P                  P                  V4      '       g   Q h\         P                  P                  R4      '       d   Q h\        V4      ;_uu_ 4       p\        VP                  4       4      pRRR4       R X 4       pV Uu. uF  qP                  R4      '       d   K  VNK  	  p	p\        V	4      ^8X  g   Q hR#   + '       g   i     LV; iu upi )z	pip-wheelworld.pyNc              3   V   "   T F  qP                  R 4      '       g   K  Vx  K!  	  R# 5i)z.pyN)endswith).0fs   & r   	<genexpr>8TestBuildMetaBackend.test_build_wheel.<locals>.<genexpr>  s     I^zz%7H!!^s   )
)rw   )r>   r   r?   makedirsbuild_wheeljoinisfiler   setnamelistr   len)
r   r   dist_dir
wheel_name
wheel_filezipfilewheel_contentspython_scriptsr   moduless
   &&        r   test_build_wheel%TestBuildMetaBackend.test_build_wheel   s    77??;/
H"..x8
WW\\(7
ww~~j)))) 77>>*----Z  G !1!1!34N !
 J^I,KnJJz4J11nK7|q    !  Ls   D/6EE/D?	
build_typec           
     N   R RRRR\        R4      R\        R4      /p\        P                  ! V4       \        P                  P	                  RV,           4      pV P                  4       p\        VR	V,           4      pV! V4      p\        RR
RR7      ;_uu_ 4       pVP                  R4       RRR4       V! V4      p	\        P                  P                  \        P                  P                  WG4      4      '       g   Q hWy8w  g   Q h\        \        P                  P                  WI4      R4      P                  4        V! V4      p
W8X  g   Q h\        P                  P                  \        P                  P                  WJ4      4      ^ 8  g   Q hR#   + '       g   i     L; i)rw   z$from setuptools import setup
setup()VERSIONz0.0.1rz   zo
                [metadata]
                name = foo
                version = file: VERSION
                pyproject.toml
                [build-system]
                requires = ["setuptools", "wheel"]
                build-backend = "setuptools.build_meta"
                zpreexisting-build_wtutf-8encodingz0.0.2Nwb)r   r   r   r>   r?   r   rr   openwriter   r   closegetsize)r   r   
tmpdir_cwdfilesr   r   build_methodfirst_resultversion_filesecond_resultthird_results   &&&        r   %test_build_with_existing_file_present:TestBuildMetaBackend.test_build_with_existing_file_present  sS   
 ?w d
& 	

577??>J#>?..0}h.CD
 $H- )TG44w' 5 %X.ww~~bggll8BCCCC,,, 	RWW\\(2D9??A#H-,,,wwrww||HCDqHHH 54s   FF$	setup_scriptNc                   R \        R4      R\        R4      RRRRRR	R
RRRRRRRRR///pV'       d   W#R&   V P                  4       pVP                  4       ;_uu_ 4        \        P                  ! V4       RR.p\
        P                  ! 4       ;_uu_ 4        V F  p\
        P                  ! RV\        4       K!  	  VP                  R4      pVP                  R4      pRRR4       RRR4       \        P                  ! \        P                  P                  VRX4      4      ;_uu_ 4       p	\        V	P!                  4       4      p
RRR4       \#        \        P                  P                  VRX4      4      ;_uu_ 4       p\        VP%                  4       4      p\'        VP)                  R4      R4      p\'        VP)                  R4      R4      p\'        VP)                  R4      R4      pRRR4       X
R0,
          0 R'm8X  g   Q hX0 R(m8X  g   Q hXR8X  g   Q hRRR R!R"R#\'        \+        R$4      4      ,           R#\'        \+        R%4      4      ,           3 F  pVX9   d   K  Q VV34       h	  XP-                  4       P/                  R4      '       g   Q hXP-                  4       R&8X  g   Q hR#   + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL; i))r   aj  
                [build-system]
                requires = ["setuptools", "wheel"]
                build-backend = "setuptools.build_meta"

                [project]
                name = "foo"
                license = {text = "MIT"}
                description = "This is a Python package"
                dynamic = ["version", "readme"]
                classifiers = [
                    "Development Status :: 5 - Production/Stable",
                    "Intended Audience :: Developers"
                ]
                urls = {Homepage = "http://github.com"}
                dependencies = [
                    "appdirs",
                ]

                [project.optional-dependencies]
                all = [
                    "tomli>=1",
                    "pyscaffold>=4,<5",
                    'importlib; python_version == "2.6"',
                ]

                [project.scripts]
                foo = "foo.cli:main"

                [tool.setuptools]
                zip-safe = false
                package-dir = {"" = "src"}
                packages = {find = {where = ["src"]}}
                license-files = ["LICENSE*"]

                [tool.setuptools.dynamic]
                version = {attr = "foo.__version__"}
                readme = {file = "README.rst"}

                [tool.distutils.sdist]
                formats = "gztar"
                MANIFEST.inzd
                global-include *.py *.txt
                global-exclude *.py[cod]
                z
README.rstzThis is a ``README``zLICENSE.txtz!---- placeholder MIT license ----srcfoo__init__.pyz__version__ = '0.1'z__init__.pyiz__version__: strzcli.pyz def main(): print('hello world')zdata.txtzpy.typed rw   zQ'tool.setuptools.license-files' is deprecated in favor of 'project.license-files'z/`project.license` as a TOML table is deprecatedignoretempNfoo-0.1.dist-info/METADATAr   &foo-0.1.dist-info/licenses/LICENSE.txt"foo-0.1.dist-info/entry_points.txtzfoo-0.1/setup.pyz!Summary: This is a Python packagezLicense: MITzLicense-File: LICENSE.txtz+Classifier: Intended Audience :: DeveloperszRequires-Dist: appdirszRequires-Dist: ztomli>=1 ; extra == "all"z2importlib; python_version=="2.6" and extra =="all"z$[console_scripts]
foo = foo.cli:main>   foo-0.1foo-0.1/srcfoo-0.1/src/foofoo-0.1/PKG-INFOfoo-0.1/setup.cfgfoo-0.1/README.rstfoo-0.1/LICENSE.txtfoo-0.1/MANIFEST.infoo-0.1/pyproject.tomlfoo-0.1/src/foo/cli.pyfoo-0.1/src/foo.egg-infofoo-0.1/src/foo/data.txtfoo-0.1/src/foo/py.typedfoo-0.1/src/foo/__init__.pyfoo-0.1/src/foo/__init__.pyi!foo-0.1/src/foo.egg-info/PKG-INFO$foo-0.1/src/foo.egg-info/SOURCES.txt%foo-0.1/src/foo.egg-info/not-zip-safe%foo-0.1/src/foo.egg-info/requires.txt&foo-0.1/src/foo.egg-info/top_level.txt)foo-0.1/src/foo.egg-info/entry_points.txt-foo-0.1/src/foo.egg-info/dependency_links.txt>   
foo/cli.pyfoo/data.txtfoo/py.typedfoo/__init__.pyfoo/__init__.pyifoo-0.1.dist-info/WHEELfoo-0.1.dist-info/RECORDr   foo-0.1.dist-info/top_level.txtr   r   )r   r   r   r   r   warningscatch_warningsfilterwarningsr
   build_sdistr   tarfiler   r>   r   r   getnamesr   r   r6   readr	   stripr   )r   r   r   r   r   msgsmsg
sdist_pathr   tarsdist_contentsr   r   metadatalicenseepointslines   &&&              r    test_build_with_pyproject_config5TestBuildMetaBackend.test_build_with_pyproject_config?  s    d)+X 4 0>!#8"$6@ Bk>
~  ,*..0]]__JJucAD ((**C++Hc;WX  *66v>
*66v>
	 +  \\"'',,vvzBCCs 0N D RWW\\&&*=>>' !1!1!34N7<<(DEwOHEFG ',,'KLgVG ? !3 44 9
 
 	
 
0  "
 
 	
 
 ==== 0'9$K0K$L MM+RSTU	
D 8#5dH%55#	
 ~~(()?@@@@}}"IIIIK +** __ DCC ?>>s>   8K AJ,	K ,K A+K(,J=7	K  K	K%	(K9	c                   R \        R4      R\        R4      R\        R4      /pV P                  4       pVP                  4       ;_uu_ 4        \        P                  ! V4       VP                  R4      pVP                  R4      pRRR4       VR,          P                  4       '       g   Q hVR	,          P                  4       '       g   Q hVR
,          P                  4       '       d   Q hVR,          P                  4       '       d   Q hVR,          P                  4       '       d   Q hVR,          P                  4       '       d   Q hVR,          P                  4       '       d   Q hVR,          P                  4       '       d   Q h\        P                  ! \        P                  P                  VRX4      4      ;_uu_ 4       p\        VP                  R4      P                  4       R4      pVP                  4       pRV9  g   Q h RRR4       \!        \        P                  P                  VRX4      4      ;_uu_ 4       p	\        V	P                  R4      R4      p
V	P#                  4       pRV9  g   Q h RRR4       XX
3 F%  pR F  pW9   d   K  Q h	  R F  pW9  d   K  Q h	  K'  	  R#   + '       g   i     EL1; i  + '       g   i     L; i  + '       g   i     Lf; i)r   aR  
                [build-system]
                requires = ["setuptools", "wheel"]
                build-backend = "setuptools.build_meta"

                [project]
                name = "foo"
                description = "This is a Python package"
                version = "42"
                dependencies = ["six"]
                rx   zO
                def run():
                    print('hello')
                rw   z
                __import__('setuptools').setup(
                    name='bar',
                    version='13',
                )
                r   Nztemp/foo-42.tar.gzztemp/foo-42-py3-none-any.whlztemp/bar-13.tar.gzztemp/bar-42.tar.gzztemp/foo-13.tar.gzztemp/bar-13-py3-none-any.whlztemp/bar-42-py3-none-any.whlztemp/foo-13-py3-none-any.whlzfoo-42/PKG-INFOr   zbar-13/PKG-INFOzfoo-42.dist-info/METADATAzbar-13.dist-info/METADATA)z	Name: foozVersion: 42)z	Name: barzVersion: 13)r   r   r   r   r   r   r   existsr   r   r>   r   r6   extractfiler   r   r   r   )r   r   r   r   r   r   r   pkg_infomembersr   r  filer  s   &&           r   (test_static_metadata_in_pyproject_config=TestBuildMetaBackend.test_static_metadata_in_pyproject_config  sq    d
  )
: ..0]]__JJu&226:J&226:J 
 --55777777??AAAA1199;;;;1199;;;;1199;;;;;;CCEEEE;;CCEEEE;;CCEEEE\\"'',,vvzBCCs3??+<=BBDgNHllnG$G333 D
 RWW\\&&*=>>'7<<(CDgNH&&(G.g=== ?
 h&D4|#| 54''' 5 '1 __ DC
 ?>s%   9J-AK 5K-J>	K	K$	c                   \         P                  P                  R 4      p\         P                  ! V4       VP	                  V4      p\         P                  P                  \         P                  P                  W#4      4      '       g   Q hR# )z	pip-sdistN)r>   r   r?   r   r   r   r   r   r   r   
sdist_names   &&  r   test_build_sdist%TestBuildMetaBackend.test_build_sdist  sV    77??;/
H"..x8
ww~~bggll8@AAAAr   c                   \         P                  P                  R 4      p\         P                  ! V4       VP	                  V4      p\         P                  P                  \         P                  P                  W#R4      4      '       g   Q hR# )pip-dist-infoMETADATAN)r>   r   r?   r    prepare_metadata_for_build_wheelr   r   )r   r   r   	dist_infos   &&  r   %test_prepare_metadata_for_build_wheel:TestBuildMetaBackend.test_prepare_metadata_for_build_wheel  sX    77???3
H!BB8L	ww~~bggll8
KLLLLr   c                    R F  p\         P                  ! VRR7       K  	  VP                  R4      p\         P                  P	                  \         P                  P                  VR4      4      '       g   Q hR# )za
Some users might pass metadata_directory pre-populated with `.tox` or `.venv`.
See issue #3523.
T)exist_okr   r  N)z?.tox/python/lib/python3.10/site-packages/attrs-22.1.0.dist-infozD.tox/python/lib/python3.10/site-packages/autocommand-2.2.1.dist-infoz>.nox/python/lib/python3.10/site-packages/build-0.8.0.dist-infoz4.venv/python3.10/site-packages/click-8.1.3.dist-infoz5venv/python3.10/site-packages/distlib-0.3.5.dist-infoz4env/python3.10/site-packages/docutils-0.19.dist-info)r>   r   r  r   r   r   )r   r   pre_existingr  s   &&  r   test_prepare_metadata_inplace2TestBuildMetaBackend.test_prepare_metadata_inplace  sX    

L KKt4
 "BB3G	ww~~bggll9jABBBBr   c                    \         P                  P                  R 4      pVP                  V4      p\         P                  P	                  \         P                  P                  W#4      4      '       g   Q hR# )distN)r>   r   r?   r   r   r   r  s   &&  r   test_build_sdist_explicit_dist3TestBuildMetaBackend.test_build_sdist_explicit_dist0  sL     77??6*"..x8
ww~~bggll8@AAAAr   c                H   \         P                  P                  R 4      p\         P                  ! V4       VP	                  V4      p\         P                  P                  \         P                  P                  W#4      4      '       g   Q h\         P                  P                  R4      p\         P                  P                  V4      '       g    \         P                  P                  R4      p\        VRRR7      ;_uu_ 4       pVP                  4       pRRR4       \        VRRR7      ;_uu_ 4       pVP                  XP                  RR	4      4       RRR4       \        P                  ! V4       \         P                  ! V4       VP	                  R 4      p\         P                  P                  \         P                  P                  \         P                  P                  R 4      V4      4      '       g   Q hR#   + '       g   i     L; i  + '       g   i     L; i)
	out_sdistrw   rz   rtr   r   Nr   zversion='0.0.0'zversion='0.0.1')r>   r   r?   r   r   r   r   r  r   r   r   replaceshutilrmtree)r   r   sdist_into_directoryr  	setup_locfile_handlercontents   &&     r   test_build_sdist_version_change4TestBuildMetaBackend.test_build_sdist_version_change7  sY   !ww{;
()"../CD
ww~~bggll+?LMMMM
 GGOOJ/	ww~~i((4I)TG44"'')G 5)TG44w/@BSTU 5 	*+
()"..{;
ww~~bggll277??;+GTUUUU 5444s   G>3"H>H	H!	c                   R \        R4      RRR\        R4      /p\        P                  ! V4       V P                  4       pVP	                  R4      p\
        P                  ! \        P                  P                  RV4      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)rw   
                __import__('setuptools').setup(
                    name='foo',
                    version='0.0.0',
                    py_modules=['hello']
                )rx   r   r   r   r   c              3   ,   "   T F
  pR V9   x  K  	  R# 5i)r   NrU   r   r4   s   & r   r   NTestBuildMetaBackend.test_build_sdist_pyproject_toml_exists.<locals>.<genexpr>g  s     KND'4/N   TFNr   r   r   r   r   r   r   r>   r   anyr   r   r   r   r   
targz_pathr   s   &&    r   &test_build_sdist_pyproject_toml_exists;TestBuildMetaBackend.test_build_sdist_pyproject_toml_existsP  s     d
$ 	

5..0"..v6
\\"'',,vz:;;s3KCLLNK333KCLLNKKKKK <;;;   +C2<(C2%C22D	c                   \         P                  ! \        ^ ,          4       V P                  4       pVP	                  R4      p\
        P                  ! \        P                   P                  RV4      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)r   r   c              3   ,   "   T F
  pR V9   x  K  	  R# 5irw   NrU   r3  s   & r   r   HTestBuildMetaBackend.test_build_sdist_setup_py_exists.<locals>.<genexpr>q  s     EndzT)nr5  TFN)r   r   defnsr   r   r   r   r>   r   r7  r   )r   r   r   r9  r   s   &&   r    test_build_sdist_setup_py_exists5TestBuildMetaBackend.test_build_sdist_setup_py_existsi  s     	

58..0"..v6
\\"'',,vz:;;s3EcllnE333EcllnEEEEE <;;;s   ?+C#-(C#C##C4	c                   R \        R4      RRR\        R4      /p\        P                  ! V4       V P                  4       pVP	                  R4      p\
        P                  ! \        P                  P                  RV4      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      '       d   Q h R
R
R
4       R
#   + '       g   i     R
# ; i)rw   z
        __import__('setuptools').setup(
            name='foo',
            version='0.0.0',
            py_modules=['hello']
        )rx   r   r   z"
        exclude setup.py
        r   c              3   ,   "   T F
  pR V9   x  K  	  R# 5ir?  rU   r3  s   & r   r   STestBuildMetaBackend.test_build_sdist_setup_py_manifest_excluded.<locals>.<genexpr>  s     I.$:-.r5  TFNr6  r8  s   &&    r   +test_build_sdist_setup_py_manifest_excluded@TestBuildMetaBackend.test_build_sdist_setup_py_manifest_excludeds  s      4
" 	

5..0"..v6
\\"'',,vz:;;ssI#,,.IsssI#,,.IIIIII <;;;r<  c                    R \        R4      RRR\        R4      /p\        P                  ! V4       V P                  4       pVP	                  R4       R# )rw   r1  rx   r   rz   zE
                [sdist]
                formats=zip
                r   N)r   r   r   r   r   )r   r   r   r   s   &&  r   3test_build_sdist_builds_targz_even_if_zip_indicatedHTestBuildMetaBackend.test_build_sdist_builds_targz_even_if_zip_indicated  sX     
$ 	

5..0!!&)r   rw   z
            __import__('setuptools').setup(
                name='foo',
                version=__import__('hello').__version__,
                py_modules=['hello']
            )rx   z__version__ = "0.0.0"rz   z9
            [sdist]
            formats=zip
            c                
   \         P                  ! V P                  4       V P                  4       p\        P
                  ! \        R R7      ;_uu_ 4        VP                  R4       RRR4       R#   + '       g   i     R# ; i)z^No module named 'hello'$matchr   N)r   r   _relative_path_import_filesr   rH   raisesImportErrorr   r   r   r   s   && r   %test_build_sdist_relative_path_import:TestBuildMetaBackend.test_build_sdist_relative_path_import  sR    

4334..0]];.IJJ%%f- KJJJ   A11B	r   zX
            [project]
            name = "proj"
            version = "42"
            r   projr   r   c                    \        \        V4      P                  R4      4      pV'       g   Q hV FB  pVP                  4       '       d   K  \        P
                  ! V4      P                  ^ 8  d   KB  Q h	  R# )z?All files in the directory should be either links or hard linksz**/*N)listr   glob
is_symlinkr>   statst_nlink)r   
parent_dirr   r  s   &&  r   _assert_link_tree&TestBuildMetaBackend._assert_link_tree  sU    T*%**623uD??$$(>(>(BBB r   c                   \         P                  ! V P                  4       V P                  4       p\	        R4      P                  4       '       d   Q hVP                  R4       \	        R4      P                  4       '       d   Q hR# )z
Sanity check to ensure tests with --mode=strict are different from the ones
without --mode.

--mode=strict should create a local directory with a package tree.
The directory should not get created otherwise.
r   r   N)r   r   _simple_pyproject_exampler   r   r  build_editablerR  s   && r   %test_editable_without_config_settings:TestBuildMetaBackend.test_editable_without_config_settings  sg     	

4112..0=''))))$$V,='')))))r   c                p   R RR./p\         P                  ! V P                  4       V P                  4       p\	        R4      P                  4       '       d   Q h\	        R4      P                  4        VP                  RV4       VP                  RV4       \	        R4      P                  4       '       g   Q hR# )z--build-option	build_extz	--inplacer   zbuild/proj-42-py3-none-any.whlN)	r   r   ra  r   r   r  mkdirr  r   r   r   config_settingsr   s   &&  r   test_build_wheel_inplace-TestBuildMetaBackend.test_build_wheel_inplace  s    +k;-GH

4112..0=''))))W66wP!!'?;45<<>>>>r   ri  zeditable-modestrictc                b   \         P                  ! / V P                  CR / /C4       \        R4      P	                  4       '       d   Q hV P                  4       pVP                  R V4       VP                  RVR 4       V P                  \        \        R4      P                  R4      4      4       R# )_metar   r   z__editable__.*N)r   r   ra  r   r  r   #prepare_metadata_for_build_editablerb  r^  nextrY  rh  s   &&& r   "test_editable_with_config_settings7TestBuildMetaBackend.test_editable_with_config_settings  s    

Bd44BgrBC=''))))..099'?S$$V_gFtDM$6$67G$HIJr   z'foo'r   z['foo']z'foo\n'z	'foo\n\n'z['foo', 'bar']barz'# Has a comment line\nfoo'z'foo # Has an inline comment'z'foo \\\n >=3.0'zfoo>=3.0z
'foo\nbar'z'foo\nbar\n'z['foo\n', 'bar\n']	use_wheelTFc                ,   R \        R4      P                  VR7      R\        R4      /p\        P                  ! V4       V P	                  4       pV'       d   VP
                  pMVP                  p\        V4      pV! 4       p	V\        V	4      8X  g   Q hR# )rw   a  
                from setuptools import setup

                setup(
                    name="qux",
                    version="0.0.0",
                    py_modules=["hello"],
                    setup_requires={setup_literal},
                )
            )setup_literalrx   ry   N)r   r7   r   r   r   r   r   r   )
r   rv  requirementsrt  r   r   r   get_requiresr   r   s
   &&&&&     r   test_setup_requires(TestBuildMetaBackend.test_setup_requires  s    & 	 f=f1
* 	

5..0(EEL(EEL ,'6&>)))r   c                    R \        R4      R\        R4      RRRR/p\        P                  ! V4       V P                  4       pVP	                  4       pVR.8X  g   Q hR	# )
r   zd
                [project]
                name = "proj"
                version = "42"
            rw   z
                __import__('setuptools').setup(
                    setup_requires=["foo"],
                    py_modules = ["hello", "world"]
                )
            rx   z'hello'r   z'world'r   N)r   r   r   r   r   )r   r   r   r   setup_requiress   &&   r   'test_setup_requires_with_auto_discovery<TestBuildMetaBackend.test_setup_requires_with_auto_discovery&  sq    
 d  		#
& 	

5..0&CCE%(((r   c                   R \        R4      R\        R4      /p\        P                  ! V4       V P                  4       p\        P                  P                  R4      p\        P                  ! V4       VP                  V4       R# )rw   aN  
                        from setuptools import setup

                        setup(
                            name="qux",
                            version="0.0.0",
                            py_modules=["hello"],
                            setup_requires=["does-not-exist >99"],
                        )
                    rx   z[
                    def run():
                        print('hello')
                    r  N)r   r   r   r   r>   r?   r   r  )r   r   r   r   r   s   &&   r    test_dont_install_setup_requires5TestBuildMetaBackend.test_dont_install_setup_requiresB  ss    	 
* 	

5..077???3
H 	66x@r   aD  
            import os
            import sys

            __import__('setuptools').setup(
                name='foo',
                version='0.0.0',
            )

            sys_argv = os.path.abspath(sys.argv[0])
            file_path = os.path.abspath('setup.py')
            assert sys_argv == file_path
            c                   \         P                  ! V P                  4       V P                  4       p\        P
                  ! \        4      ;_uu_ 4        VP                  R 4       RRR4       R#   + '       g   i     R# ; ir   N)r   r   _sys_argv_0_passthroughr   rH   rP  AssertionErrorr   rR  s   && r   test_sys_argv_passthrough.TestBuildMetaBackend.test_sys_argv_passthroughu  sN    

4//0..0]]>**%%f- +***s   A//B 	a  
            import os
            assert os.path.isabs(__file__)
            __import__('setuptools').setup(
                name='foo',
                version='0.0.0',
                py_modules=['hello'],
                setup_requires=['six'],
            )
            c                    \         P                  ! V P                  4       V P                  4       pVP	                  R 4       R# r  )r   r   _setup_py_file_abspathr   r   rR  s   && r   test_setup_py_file_abspath/TestBuildMetaBackend.test_setup_py_file_abspath  s0    

4../..0!!&)r   
build_hookc                
   R R/p\         P                  ! V4       \        P                  ! R4      p\        P
                  ! \        VR7      ;_uu_ 4        \        W4      ! R4       RRR4       R#   + '       g   i     R# ; i)rw   r   zNo distribution was found.rM  r   N)r   r   reescaperH   rP  
ValueErrorrr   )r   r   r  r   r   s   &&&  r   test_build_with_empty_setuppy2TestBuildMetaBackend.test_build_with_empty_setuppy  sT    R 

5ii45]]:S11M.v6 2111rU  rU   )wheelsdist)rv  rw  )r   r   ).r   r   r    r!   r   r   rH   fixturerA  r   r   r   r   markparametrizer   SETUP_SCRIPT_STUBr  r  r  r  r  r"  r.  r:  rB  rG  rJ  r   rO  rS  ra  r^  rc  rj  rq  ry  r}  r  r  r  r  r  r  r"   r#   r$   s   @r   r|   r|      s    *L< ^^5!+ "+
2
2
!( [[\+=>0I ?0Id [[^d4E-FGOJ HOJb=(~BMC"BV2L2FJ4*2 	D
 	+T
#$. 	$
 	+,	!C*? [[./81L0MNK OK [[)ug %!E7#u~.+eW5-w7 :,/UEN+uen-"UEN3	
  [[[4-8#* 9!"#*J)8AD 	D
$. 	D	
*
 [[\+IJ7 K7r   r|   c                   0   a  ] tR tRt o RtR tR tRtV tR# )TestBuildMetaLegacyBackendi  z setuptools.build_meta:__legacy__c                    \         P                  ! V P                  4       V P                  4       pVP	                  R 4       R# r  )r   r   rO  r   r   rR  s   && r   rS  @TestBuildMetaLegacyBackend.test_build_sdist_relative_path_import  s0    

4334..0!!&)r   c                    \         P                  ! V P                  4       V P                  4       pVP	                  R 4       R# r  )r   r   r  r   r   rR  s   && r   r  4TestBuildMetaLegacyBackend.test_sys_argv_passthrough  s0    

4//0..0!!&)r   rU   N)	r   r   r    r!   r   rS  r  r"   r#   r$   s   @r   r  r    s     5L** *r   r  z/ignore::setuptools.SetuptoolsDeprecationWarningc                    V P                  V4       RpVR,          P                  \        V4      RR7       \        RR7      pVP	                  4       . 8X  g   Q hR# )zHSetuptools should be resilient to setup.py with ``sys.exit(0)`` (#3973).zr
        import sys, setuptools
        setuptools.setup(name='foo', version='0.0.0')
        sys.exit(0)
        rw   r   r   r   r~   N)rm   
write_textr   r'   r   monkeypatchtmp_pathsetuppyrt   s   &&  r   test_sys_exit_0_in_setuppyr    sY     hG
 
&&tG}w&G(?@G//1R777r   c                    V P                  V4       R pVR,          P                  VRR7       \        P                  ! \        RR7      ;_uu_ 4        \        RR7      pVP                  4        RRR4       R#   + '       g   i     R# ; i)	z"import sys; sys.exit('some error')rw   r   r   z
some errorrM  r   r~   N)rm   r  rH   rP  
SystemExitr'   r   r  s   &&  r   test_system_exit_in_setuppyr    sd    h2G
&&w&A	z	6	6,CD,,. 
7	6	6	6s   A99B
	).rZ   rp   r>   r  r(  r^   sysr   r   
concurrentr   pathlibr   typingr   r   r   r   rH   jaracor   packaging.requirementsr	   setuptools.warningsr
   textwrapr   r  intgetenvrD   builtin_module_namesrN   r  skipifplatform
pytestmarkr   r'   r@   rA  r|   r  r   r  r  rU   r   r   <module>r     s     	 	   
          . < 6  bii.6
7
00
0 [[LLG''   
) ) P#  PF3) 3, 	D	
 	D
& 	D

 	D
( 	D
 	D
. 	D
4 	T

 	D
( 	T

 	6D
Q|	~t
7 t
7n*!5 *$ MN
8 O
8/r   