403Webshell
Server IP : 217.160.0.244  /  Your IP : 216.73.217.138
Web Server : Apache
System : Linux infong-eu155 4.4.400-icpu-108 #2 SMP Wed Feb 11 11:51:01 UTC 2026 x86_64
User : u100174116 ( 6746176)
PHP Version : 8.5.10
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/setuptools/tests/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/setuptools/tests/__pycache__/test_build_meta.cpython-313.pyc
�

�hF��
���SSKrSSKrSSKrSSKrSSKrSSKrSSKrSSKrSSKrSSK	J
r
 SSKJr SSK
JrJr SSKJr SSKrSSKJr SSKJr SSKJr S	S
KJr Sr\"\R:"SS
55rS\R>;r \RBRE\RFS:H=(a \ SS9r$"SS5r%"SS\%5r&"SS\%5r'\"S5\"S5S.\"S5\"S5S.\"S5\"S5S.S\"S50\"S5\"S 5S!.\"S5S\"S 5S"./r("S#S$5r)"S%S&\)5r*S'r+\RBRYS(5S)5r-S*r.g)+�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��\rSrSrSSjrSrg)�BuildBackendBase�%Nc�<�XlU=(d 0UlX0lg)N)�cwd�env�backend_name)�selfrrrs    �B/usr/lib/python3/dist-packages/setuptools/tests/test_build_meta.py�__init__�BuildBackendBase.__init__&s�����9�"���(��)rrr)�.N�setuptools.build_meta)�__name__�
__module__�__qualname__�__firstlineno__r�__static_attributes__�rrrr%s��)rrc�N^�\rSrSrSrU4SjrS\S\S\44Sjr	Sr
S	rU=r$)
�BuildBackend�,zPEP 517 Build Backendc�X>�[TU]"U0UD6 [R"SS9Ulg)Nr)�max_workers)�superrr�ProcessPoolExecutor�pool)r�args�kwargs�	__class__s   �rr�BuildBackend.__init__/s'���
���$�)�&�)��/�/�A�>��	r�name�return.c�^^�UU4SjnU$)�<Handles arbitrary function invocations on the build backend.c��>�[RRTR5n[	UTR
TR5nSnTRR[R5R[5nTRR"UT/UQ70UD6R[5$![RaK TRRSS9 TRU5 [ R""S[S35 g[R$R&[([*4a# [,(a[ R""S5 ef=f)NF)�waitz(Backend did not respond before timeout (z s)z3PyPy frequently fails tests with ProcessPoolExector)�osr�abspathr�BuildBackendCallerrrr-�submit�getpid�result�TIMEOUTr�TimeoutError�shutdown�_kill�pytest�xfail�process�BrokenProcessPool�MemoryError�OSError�IS_PYPY)r.�kw�root�caller�pidr2rs     ��r�method�(BuildBackend.__getattr__.<locals>.method6s����7�7�?�?�4�8�8�,�D�'��d�h�h��8I�8I�J�F��C�

��i�i�&�&�r�y�y�1�8�8��A���y�y�'�'���B�t�B�r�B�I�I�'�R�R���'�'�
V��	�	�"�"��"�.��
�
�3�����G��y�PS�T�U��O�O�5�5�{�G�L�
��7��L�L�!V�W��
�s�A/B?�?AE(�AE(r%)rr2rMs`` r�__getattr__�BuildBackend.__getattr__3s���	� �
rc��Ucg[R"[[5 [R
"U[RS:Xa[RO[R5 SSS5 g!,(df   g=f)N�nt)
�
contextlib�suppress�ProcessLookupErrorrGr8�killr2�signal�SIGTERM�SIGKILL)rrLs  rrA�BuildBackend._killHsI���;��
�
 �
 �!3�W�
=��G�G�C�2�7�7�d�?�������O�>�
=�
=�s�A
A7�7
B)r-)
r r!r"r#�__doc__r�strrrrOrAr$�
__classcell__�r0s@rr'r',s3����?������c��(:��*P�Prr'c�.^�\rSrSrU4SjrSrSrU=r$)r:�Oc�v>�[TU]"U0UD6 URRS5uUlo0lg)N�:)r+rr�	partition�backend_obj)rr.r/�_r0s    �rr�BuildBackendCaller.__init__Ps6���
���$�)�&�)�37�3D�3D�3N�3N�s�3S�0��	�A�/rc�H�[R"UR5 [RR	UR
5 [R"UR5nUR(a[X@R5nOUn[XQ5"U0UD6$)r5)r8�chdirr�environ�updater�	importlib�
import_modulerrd�getattr)rr2r.rI�mod�backends      r�__call__�BuildBackendCaller.__call__Usq��
�������
�
�
���$�(�(�#��%�%�d�&7�&7�8������c�#3�#3�4�G��G��w�%�t�2�r�2�2r)rrd)r r!r"r#rrpr$r]r^s@rr:r:Os���T�
3�3rr:z�
            __import__('setuptools').setup(
                name='foo',
                version='0.0.0',
                py_modules=['hello'],
                setup_requires=['six'],
            )
            �C
            def run():
                print('hello')
            ��setup.py�hello.pyz�
            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'],
            )
            rta�
            # 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')
            z�
        [metadata]
        name = foo
        version = 0.0.0

        [options]
        py_modules=hello
        setup_requires=six
        z7
        def run():
            print('hello')
        )�	setup.cfgru)rvrtruc�2�\rSrSrSrSr\R"\S9S5r	Sr
SrSr\RRS	S
5S5r\RRSS
\/5S5rSrSrSrSrSrSrSrSrSrSr\"S5S\"S5S.rSr\"S5SS S!00S".rS#r S$r!S%r"\RRS&S'S(0/5S)5r#\RRS*S+S,/4S-S,/4S.S,/4S/S,/4S0S,S1/4S2S,/4S3S,/4S4S5/4S6S,S1/4S7S,S1/4S8S,S1/4/5\RRS9S:S;/5S<55r$S=r%S>r&S?\"S@50r'SAr(S?\"SB50r)SCr*\RRSDSE5SF5r+SGr,g
)H�TestBuildMetaBackend��rc�(�[URS9$)N�r)r'r)rs r�get_build_backend�&TestBuildMetaBackend.get_build_backend�s����):�):�;�;r)�paramsc#��# �[R"UR[U5S9 UR	5 UR5v� SSS5 g!,(df   g=f7f)N)�prefix)r�build�paramr\�as_cwdr|)r�tmpdir�requests   r�
build_backend�"TestBuildMetaBackend.build_backend�s<����
�
�7�=�=��V��5�
�]�]�_��(�(�*�*��_�_�s�9A(�A�	A(�
A%�!A(c�^�UR5nS/n[U5[U5:Xdeg�N�six)�get_requires_for_build_wheel�sorted�rr��actual�expecteds    r�!test_get_requires_for_build_wheel�6TestBuildMetaBackend.test_get_requires_for_build_wheel��.���;�;�=���7���f�~���!1�1�1�1rc�^�UR5nS/n[U5[U5:Xdegr�)�get_requires_for_build_sdistr�r�s    r�!test_get_requires_for_build_sdist�6TestBuildMetaBackend.test_get_requires_for_build_sdist�r�rc�r�[RRS5n[R"U5 UR	U5n[RRX#5n[RR
U5(de[RR
S5(ae[U5n[UR55nSSS5 SW5nUVs/sHo�RS5(aMUPM n	n[U	5S:Xdeg!,(df   NR=fs snf)Nz	pip-wheel�world.pyc3�T# �UHoRS5(dMUv� M  g7f)z.pyN)�endswith)�.0�fs  r�	<genexpr>�8TestBuildMetaBackend.test_build_wheel.<locals>.<genexpr>s���I�^��z�z�%�7H�!�!�^�s�(�	(rtr)r8rr9�makedirs�build_wheel�join�isfiler�set�namelistr��len)
rr��dist_dir�
wheel_name�
wheel_file�zipfile�wheel_contents�python_scriptsr��moduless
          r�test_build_wheel�%TestBuildMetaBackend.test_build_wheel�s����7�7�?�?�;�/��
���H��"�.�.�x�8�
��W�W�\�\�(�7�
��w�w�~�~�j�)�)�)�)��7�7�>�>�*�-�-�-�-�
�Z�
 �G� ��!1�!1�!3�4�N�!�
J�^�I��,�K�n��J�J�z�4J�1�n��K��7�|�q� � � �!�
 ��Ls�=D#�,D4�	D4�#
D1�
build_type)�wheel�sdistc��SS[S5[S5S.n[R"U5 [RR	SU-5nUR5n[
USU-5nU"U5n[SS	S
S9nURS5 SSS5 U"U5n	[RR[RRXG55(deXy:wde[[RRXI5S
5R5 U"U5n
X�:Xde[RR[RRXJ55S:�deg!,(df   N�=f)Nz$from setuptools import setup
setup()z0.0.1zo
                [metadata]
                name = foo
                version = file: VERSION
                ��
                [build-system]
                requires = ["setuptools", "wheel"]
                build-backend = "setuptools.build_meta"
                )rt�VERSIONrv�pyproject.tomlzpreexisting-�build_r��wt�utf-8��encodingz0.0.2�wbr)
rrr�r8r9r|rm�open�writer�r��close�getsize)rr��
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sH��
@�����#���
��&	
�
�
�5���7�7�?�?�>�J�#>�?���.�.�0�
��}�h��.C�D��
$�H�-���)�T�G�
4�����w�'�5�%�X�.�
��w�w�~�~�b�g�g�l�l�8�B�C�C�C�C��,�,�,�	
�R�W�W�\�\�(�
2�D�9�?�?�A�#�H�-���,�,�,��w�w���r�w�w�|�|�H�C�D�q�H�H�H�5�
4�s�E9�9
F�setup_scriptNc�n�[S5[S5SSSSSSSS	S
.0S.nU(aX#S'UR5nUR5 [R"U5 S
S/n[
R"5 UHn[
R"SU[5 M! URS5nURS5nSSS5 SSS5 [R"[RRUSW55n	[U	R!55n
SSS5 [#[RRUSW55n[UR%55n['UR)S5S5n
['UR)S5S5n['UR)S5S5nSSS5 W
S1-
1Sk:XdeW1Sk:XdeWS:XdeSSSSSS['[+S55-S['[+S55-4HnUW
;aMUU
45e W
R-5R/S5(deWR-5S :Xdeg!,(df   GN�=f!,(df   GN�=f!,(df   GNv=f!,(df   N�=f)!Naj
                [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"
                zd
                global-include *.py *.txt
                global-exclude *.py[cod]
                zThis is a ``README``z!---- placeholder MIT license ----�fooz__version__ = '0.1'z__version__: strz def main(): print('hello world')�)�__init__.pyz__init__.pyizcli.pyzdata.txtzpy.typed)r��MANIFEST.inz
README.rstzLICENSE.txt�srcrtzQ'tool.setuptools.license-files' is deprecated in favor of 'project.license-files'z/`project.license` as a TOML table is deprecated�ignore�temp�foo-0.1.dist-info/METADATAr��&foo-0.1.dist-info/licenses/LICENSE.txt�"foo-0.1.dist-info/entry_points.txtzfoo-0.1/setup.py>�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�z!Summary: This is a Python packagezLicense: MITzLicense-File: LICENSE.txtz+Classifier: Intended Audience :: DeveloperszRequires-Dist: appdirszRequires-Dist: ztomli>=1 ; extra == "all"z2importlib; python_version=="2.6" and extra =="all"z$[console_scripts]
foo = foo.cli:main)rr|r�rr��warnings�catch_warnings�filterwarningsr
�build_sdistr��tarfiler�r8r�r��getnamesrr�r\�readr	�stripr�)rr�r�r�r��msgs�msg�
sdist_pathr��tar�sdist_contentsr�r��metadata�license�epoints�lines                 r� test_build_with_pyproject_config�5TestBuildMetaBackend.test_build_with_pyproject_config?s���#�)�+�X ���1�>��#8�$6�@� B� "���k>
��~� ,�*���.�.�0�
�
�]�]�_��J�J�u��c�A��D��(�(�*��C��+�+�H�c�;W�X� �*�6�6�v�>�
�*�6�6�v�>�
�	+�
��\�\�"�'�'�,�,�v�v�z�B�
C�s� �����0�N�D��R�W�W�\�\�&�&�*�=�
>�'� ��!1�!1�!3�4�N��7�<�<�(D�E�w�O�H�����E�F���G��'�,�,�'K�L�g�V�G�
?��!3� 4�4�9
�
�	
�
�0�"
�
�	
�
��=�=�=�=�
0��'�9�$���K�0K�$L� M�M���+�R�S�T�
U�	
�D��8�#�5�d�H�%5�5�#�	
��~�~��(�(�)?�@�@�@�@��}�}��"I�I�I�I�K+�*��
�_��D�
C��?�
>�s>�0J�>AI0�J�J�A+J&�0
I?	�:J�
J�
J#�&
J4c�4�[S5[S5[S5S.nUR5nUR5 [R"U5 URS5nUR
S5nSSS5 US-R5(deUS-R5(deUS-R5(aeUS	-R5(aeUS
-R5(aeUS-R5(aeUS-R5(aeUS
-R5(ae[R"[RRUSW55n[URS5R5S5nUR5nSU;deSSS5 [![RRUSW55n	[U	RS5S5n
U	R#5nSU;deSSS5 WW
4H#nSH
nX�;aM
e SH
nX�;aM
e M% g!,(df   GN�=f!,(df   N�=f!,(df   N]=f)NaR
                [build-system]
                requires = ["setuptools", "wheel"]
                build-backend = "setuptools.build_meta"

                [project]
                name = "foo"
                description = "This is a Python package"
                version = "42"
                dependencies = ["six"]
                zO
                def run():
                    print('hello')
                z�
                __import__('setuptools').setup(
                    name='bar',
                    version='13',
                )
                )r�rurtr�ztemp/foo-42.tar.gzztemp/foo-42-py3-none-any.whlztemp/bar-13.tar.gzztemp/bar-42.tar.gzztemp/foo-13.tar.gzztemp/bar-13-py3-none-any.whlztemp/bar-42-py3-none-any.whlztemp/foo-13-py3-none-any.whlzfoo-42/PKG-INFOr�zbar-13/PKG-INFOzfoo-42.dist-info/METADATAzbar-13.dist-info/METADATA)z	Name: foozVersion: 42)z	Name: barzVersion: 13)rr|r�rr�r�r��existsr�r�r8r�r\�extractfiler�r�rr�)
rr�r�r�r�r�r��pkg_info�membersr�r�filers
             r�(test_static_metadata_in_pyproject_config�=TestBuildMetaBackend.test_static_metadata_in_pyproject_config�sa��#�
��������)
��:�.�.�0�
�
�]�]�_��J�J�u��&�2�2�6�:�J�&�2�2�6�:�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�
�\�\�"�'�'�,�,�v�v�z�B�
C�s��3�?�?�+<�=�B�B�D�g�N�H��l�l�n�G�$�G�3�3�3�D�
�R�W�W�\�\�&�&�*�=�
>�'��7�<�<�(C�D�g�N�H��&�&�(�G�.�g�=�=�=�?�
�h�&�D�4���|�#�|�5�4���'�'�'�5�'�1�_��D�
C��
?�
>�s%�9I&�AI8�=4J	�&
I5�8
J�	
Jc��[RRS5n[R"U5 UR	U5n[RR[RR
X#55(deg)Nz	pip-sdist)r8rr9r�r�r�r��rr�r��
sdist_names    r�test_build_sdist�%TestBuildMetaBackend.test_build_sdistsV���7�7�?�?�;�/��
���H��"�.�.�x�8�
��w�w�~�~�b�g�g�l�l�8�@�A�A�A�Arc��[RRS5n[R"U5 UR	U5n[RR[RR
X#S55(deg)N�
pip-dist-info�METADATA)r8rr9r�� prepare_metadata_for_build_wheelr�r�)rr�r��	dist_infos    r�%test_prepare_metadata_for_build_wheel�:TestBuildMetaBackend.test_prepare_metadata_for_build_wheelsX���7�7�?�?�?�3��
���H��!�B�B�8�L�	��w�w�~�~�b�g�g�l�l�8�
�K�L�L�L�Lrc���SHn[R"USS9 M URS5n[RR	[RRUS55(deg)za
Some users might pass metadata_directory pre-populated with `.tox` or `.venv`.
See issue #3523.
)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-infoT)�exist_okrrN)r8r�rrr�r�)rr��pre_existingrs    r�test_prepare_metadata_inplace�2TestBuildMetaBackend.test_prepare_metadata_inplacesX��

�L�
�K�K��t�4�
�"�B�B�3�G�	��w�w�~�~�b�g�g�l�l�9�j�A�B�B�B�Brc���[RRS5nURU5n[RR	[RRX#55(deg)N�dist)r8rr9r�r�r�rs    r�test_build_sdist_explicit_dist�3TestBuildMetaBackend.test_build_sdist_explicit_dist0sL���7�7�?�?�6�*��"�.�.�x�8�
��w�w�~�~�b�g�g�l�l�8�@�A�A�A�Arc��[RRS5n[R"U5 UR	U5n[RR[RR
X#55(de[RRS5n[RRU5(d[RRS5n[USSS9nUR5nSSS5 [USSS9nURWRSS	55 SSS5 [R"U5 [R"U5 UR	S5n[RR[RR
[RRS5U55(deg!,(df   N�=f!,(df   N�=f)
N�	out_sdistrtrv�rtr�r�r�zversion='0.0.0'zversion='0.0.1')r8rr9r�r�r�r�rr�r�r��replace�shutil�rmtree)rr��sdist_into_directoryr�	setup_loc�file_handler�contents       r�test_build_sdist_version_change�4TestBuildMetaBackend.test_build_sdist_version_change7sS��!�w�w���{�;��
���(�)�"�.�.�/C�D�
��w�w�~�~�b�g�g�l�l�+?�L�M�M�M�M�
�G�G�O�O�J�/�	��w�w�~�~�i�(�(�������4�I�
�)�T�G�
4��"�'�'�)�G�5�
�)�T�G�
4�����w���/@�BS�T�U�5�	�
�
�*�+�
���(�)�"�.�.�{�;�
��w�w�~�~�b�g�g�l�l�2�7�7�?�?�;�+G��T�U�U�U�U�5�
4��
4�
4�s�7G$�"G5�$
G2�5
Hc��[S5S[S5S.n[R"U5 UR5nUR	S5n[
R"[RRSU55n[SUR555(deSSS5 g!,(df   g=f)N��
                __import__('setuptools').setup(
                    name='foo',
                    version='0.0.0',
                    py_modules=['hello']
                )r�r�)rtrur�r�c3�,# �UH
nSU;v� M g7f)r�Nr%�r�r2s  rr��NTestBuildMetaBackend.test_build_sdist_pyproject_toml_exists.<locals>.<genexpr>gs���K�N�D�'�4�/�N����rrr�r|r�r�r�r8r��anyr��rr�r�r��
targz_pathr�s      r�&test_build_sdist_pyproject_toml_exists�;TestBuildMetaBackend.test_build_sdist_pyproject_toml_existsPs�������"���
��$	
�
�
�5���.�.�0�
�"�.�.�v�6�
�
�\�\�"�'�'�,�,�v�z�:�
;�s��K�C�L�L�N�K�K�K�K�K�<�
;�
;���(B6�6
Cc�l�[R"[S5 UR5nUR	S5n[
R"[RRSU55n[SUR555(deSSS5 g!,(df   g=f)Nrr�c3�,# �UH
nSU;v� M g7f�rtNr%r2s  rr��HTestBuildMetaBackend.test_build_sdist_setup_py_exists.<locals>.<genexpr>qs���E�n�d�z�T�)�n�r4)rr��defnsr|r�r�r�r8r�r6r�)rr�r�r8r�s     r� test_build_sdist_setup_py_exists�5TestBuildMetaBackend.test_build_sdist_setup_py_existsisx��	
�
�
�5��8���.�.�0�
�"�.�.�v�6�
�
�\�\�"�'�'�,�,�v�z�:�
;�s��E�c�l�l�n�E�E�E�E�E�<�
;�
;�s�3(B%�%
B3c��[S5S[S5S.n[R"U5 UR5nUR	S5n[
R"[RRSU55n[SUR555(aeSSS5 g!,(df   g=f)Nz�
        __import__('setuptools').setup(
            name='foo',
            version='0.0.0',
            py_modules=['hello']
        )r�z"
        exclude setup.py
        )rtrur�r�c3�,# �UH
nSU;v� M g7fr>r%r2s  rr��STestBuildMetaBackend.test_build_sdist_setup_py_manifest_excluded.<locals>.<genexpr>�s���I�.�$�:��-�.�r4r5r7s      r�+test_build_sdist_setup_py_manifest_excluded�@TestBuildMetaBackend.test_build_sdist_setup_py_manifest_excludedss����
������
��"	
�
�
�5���.�.�0�
�"�.�.�v�6�
�
�\�\�"�'�'�,�,�v�z�:�
;�s��I�#�,�,�.�I�I�I�I�I�I�<�
;�
;�r;c��[S5S[S5S.n[R"U5 UR5nUR	S5 g)Nr0r�zE
                [sdist]
                formats=zip
                �rtrurvr�)rrr�r|r�)rr�r�r�s    r�3test_build_sdist_builds_targz_even_if_zip_indicated�HTestBuildMetaBackend.test_build_sdist_builds_targz_even_if_zip_indicated�sR���������
��$	
�
�
�5���.�.�0�
��!�!�&�)rz�
            __import__('setuptools').setup(
                name='foo',
                version=__import__('hello').__version__,
                py_modules=['hello']
            )z__version__ = "0.0.0"z9
            [sdist]
            formats=zip
            rIc���[R"UR5 UR5n[R
"[SS9 URS5 SSS5 g!,(df   g=f)Nz^No module named 'hello'$��matchr�)rr��_relative_path_import_filesr|rB�raises�ImportErrorr��rr�r�s   r�%test_build_sdist_relative_path_import�:TestBuildMetaBackend.test_build_sdist_relative_path_import�sL���
�
�4�3�3�4��.�.�0�
�
�]�]�;�.I�
J��%�%�f�-�K�
J�
J���
A%�%
A3zX
            [project]
            name = "proj"
            version = "42"
            �projr�r�)r�r�c���[[U5RS55nU(deUH@nUR5(aM[R
"U5RS:�aM@e g)z?All files in the directory should be either links or hard linksz**/*rN)�listr�glob�
is_symlinkr8�stat�st_nlink)r�
parent_dirr�rs    r�_assert_link_tree�&TestBuildMetaBackend._assert_link_tree�sU���T�*�%�*�*�6�2�3����u��D��?�?�$�$�����
�(>�(>��(B�B�B�rc��[R"UR5 UR5n[	S5R5(aeUR
S5 [	S5R5(aeg)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)rr��_simple_pyproject_exampler|rr�build_editablerRs   r�%test_editable_without_config_settings�:TestBuildMetaBackend.test_editable_without_config_settings�sg��	
�
�
�4�1�1�2��.�.�0�
���=�'�'�)�)�)�)��$�$�V�,���=�'�'�)�)�)�)�)rc�j�SSS/0n[R"UR5 UR5n[	S5R5(ae[	S5R
5 URSU5 URSU5 [	S5R5(deg)Nz--build-option�	build_extz	--inplacer�zbuild/proj-42-py3-none-any.whl)	rr�rar|rr�mkdirrr��rr��config_settingsr�s    r�test_build_wheel_inplace�-TestBuildMetaBackend.test_build_wheel_inplace�s���+�k�;�-G�H���
�
�4�1�1�2��.�.�0�
���=�'�'�)�)�)�)��W�
�����6�6�w��P��!�!�'�?�;��4�5�<�<�>�>�>�>rriz
editable-mode�strictc�^�[R"0URES00E5 [S5R	5(aeUR5nUR
SU5 URSUS5 UR[[S5RS555 g)N�_metar�r�z__editable__.*)rr�rarrr|�#prepare_metadata_for_build_editablerbr^�nextrYrhs    r�"test_editable_with_config_settings�7TestBuildMetaBackend.test_editable_with_config_settings�s����
�
�B�d�4�4�B�g�r�B�C���=�'�'�)�)�)�)��.�.�0�
��9�9�'�?�S��$�$�V�_�g�F����t�D��M�$6�$6�7G�$H�I�Jr)�
setup_literal�requirementsz'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'zfoo>=3.0z
'foo\nbar'z'foo\nbar\n'z['foo\n', 'bar\n']�	use_wheelTFc��[S5RUS9[S5S.n[R"U5 UR	5nU(a
UR
nOURn[U5nU"5n	U[U	5:Xdeg)Na
                from setuptools import setup

                setup(
                    name="qux",
                    version="0.0.0",
                    py_modules=["hello"],
                    setup_requires={setup_literal},
                )
            )rsrrrs)r�formatrr�r|r�r�r�)
rrsrtrvr�r�r��get_requiresr�r�s
          r�test_setup_requires�(TestBuildMetaBackend.test_setup_requires�s���&�	���f�=�f�1����
��*	
�
�
�5���.�.�0�
��(�E�E�L�(�E�E�L��,�'������6�&�>�)�)�)rc��[S5[S5SSS.n[R"U5 UR5nUR	5nUS/:Xdeg)Nzd
                [project]
                name = "proj"
                version = "42"
            z�
                __import__('setuptools').setup(
                    setup_requires=["foo"],
                    py_modules = ["hello", "world"]
                )
            z'hello'z'world')r�rtrur�r�)rrr�r|r�)rr�r�r��setup_requiress     r�'test_setup_requires_with_auto_discovery�<TestBuildMetaBackend.test_setup_requires_with_auto_discovery&si��
#������"�!�#
��&	
�
�
�5���.�.�0�
�&�C�C�E���%��(�(�(rc�
�[S5[S5S.n[R"U5 UR5n[RRS5n[R"U5 URU5 g)NaN
                        from setuptools import setup

                        setup(
                            name="qux",
                            version="0.0.0",
                            py_modules=["hello"],
                            setup_requires=["does-not-exist >99"],
                        )
                    z[
                    def run():
                        print('hello')
                    rsr)rrr�r|r8r9r�r)rr�r�r�r�s     r� test_dont_install_setup_requires�5TestBuildMetaBackend.test_dont_install_setup_requiresBso���	�����
��*	
�
�
�5���.�.�0�
��7�7�?�?�?�3��
���H��	�6�6�x�@rrtaD
            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���[R"UR5 UR5n[R
"[5 URS5 SSS5 g!,(df   g=f�Nr�)rr��_sys_argv_0_passthroughr|rBrP�AssertionErrorr�rRs   r�test_sys_argv_passthrough�.TestBuildMetaBackend.test_sys_argv_passthroughusH���
�
�4�/�/�0��.�.�0�
�
�]�]�>�
*��%�%�f�-�+�
*�
*�s�A&�&
A4a
            import os
            assert os.path.isabs(__file__)
            __import__('setuptools').setup(
                name='foo',
                version='0.0.0',
                py_modules=['hello'],
                setup_requires=['six'],
            )
            c��[R"UR5 UR5nUR	S5 gr�)rr��_setup_py_file_abspathr|r�rRs   r�test_setup_py_file_abspath�/TestBuildMetaBackend.test_setup_py_file_abspath�s0���
�
�4�.�.�/��.�.�0�
��!�!�&�)r�
build_hook)r�r�c���SS0n[R"U5 [R"S5n[R
"[US9 [X5"S5 SSS5 g!,(df   g=f)Nrtr�zNo distribution was found.rMr�)rr��re�escaperBrP�
ValueErrorrm)rr�r�r�r�s     r�test_build_with_empty_setuppy�2TestBuildMetaBackend.test_build_with_empty_setuppy�sN���R� ���
�
�5���i�i�4�5��
�]�]�:�S�
1��M�.�v�6�2�
1�
1�rUr%)-r r!r"r#rr|rB�fixturer@r�r�r�r��mark�parametrizer��SETUP_SCRIPT_STUBrrrrrr!r-r9rArFrJrrOrSrar^rcrjrqrzr~r�r�r�r�r�r�r$r%rrrxrx�s���*�L�<��^�^�5�!�+�"�+�
2�
2�
!�(�[�[���\�+=�>�0I�?�0I�d�[�[���^�d�4E�-F�G�OJ�H�OJ�b=(�~B�M�C�"B�V�2L�2F�J�4*�2�
�
�,��
�
�#��$.��
�
����+�,�	!��C�*�?��[�[���.�/�8�1L�0M�N�K�O�K��[�[���)�
�u�g��
��� �
�%��!�
�E�7�#�
��u�~�.�
+�e�W�5�
-��w�7�
 �:�,�/�
�U�E�N�+�
�u�e�n�-�
"�U�E�N�3�	
�� �[�[���[�4��-�8�#*�9�!�"#*�J)�8A�D	�D�
�
���$.�	�D�	
�
�
��*�
�[�[���\�+I�J�7�K�7rrxc�$�\rSrSrSrSrSrSrg)�TestBuildMetaLegacyBackendi�z setuptools.build_meta:__legacy__c��[R"UR5 UR5nUR	S5 gr�)rr�rOr|r�rRs   rrS�@TestBuildMetaLegacyBackend.test_build_sdist_relative_path_import�s0���
�
�4�3�3�4��.�.�0�
��!�!�&�)rc��[R"UR5 UR5nUR	S5 gr�)rr�r�r|r�rRs   rr��4TestBuildMetaLegacyBackend.test_sys_argv_passthrough�s0���
�
�4�/�/�0��.�.�0�
��!�!�&�)rr%N)r r!r"r#rrSr�r$r%rrr�r��s��5�L�*�*rr�c�.�Sn[R"[U5SS.5 /SQnURXAS9R	5nSU;deSU;de0[
RESS	0En/SQnURXAUS
9R	5nSU;deg)Nz�
    [build-system]
    requires = ["setuptools"]
    build-backend = "setuptools.build_meta"
    [project]
    name = "myproj"
    version = "42"
    r�)r�zmymod.py)�pip�installz--no-build-isolationz-er)rz#running setup.py develop for myprojzcreated wheel for myproj�SETUPTOOLS_ENABLE_FEATURESzlegacy-editable)rr)rr�r�run�lowerr8ri)�venvr�r��	pyproject�cmd�outputrs       r�test_legacy_editable_installr��s����I�	�J�J�$�y�/�r�B�C�@�C�
�X�X�c�X�
&�
,�
,�
.�F�0��>�>�>�%��/�/�/�J�R�Z�Z�
I�5�7H�
I�C�
?�C�
�X�X�c�3�X�
/�
5�
5�
7�F�0�F�:�:�:rz/ignore::setuptools.SetuptoolsDeprecationWarningc��URU5 SnUS-R[U5SS9 [SS9nUR	5/:Xdeg)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)
        rtr�r�rr{N)rh�
write_textrr'r���monkeypatch�tmp_path�setuppyros    r�test_sys_exit_0_in_setuppyr��sY�����h���G�
�
��&�&�t�G�}�w�&�G��(?�@�G��/�/�1�R�7�7�7rc���URU5 SnUS-RUSS9 [R"[SS9 [SS9nUR
5 SSS5 g!,(df   g=f)	Nz"import sys; sys.exit('some error')rtr�r�z
some errorrMrr{)rhr�rBrP�
SystemExitr'r�r�s    r�test_system_exit_in_setuppyr��s^�����h��2�G�
�
��&�&�w��&�A�	���z��	6��,C�D���,�,�.�
7�	6�	6�s�A#�#
A1)/rSrkr8r�r'rW�sysr�r��
concurrentr�pathlibr�typingrrr�rrB�jaracor�packaging.requirementsr	�setuptools.warningsr
�textwraprr��int�getenvr>�builtin_module_namesrHr��skipif�platform�
pytestmarkrr'r:r@rxr�r�r�r�r�r%rr�<module>r�s�����	�	�
�
�
����� ��
��.�<��6���b�i�i�.��6�
7��
��0�0�
0���[�[�
�
��L�L�G��'��� ��
�)�)� P�#� P�F3�)�3�,�
�	
��
�
��&�
�

��
�
��(�
�

��
�
��.	�D�
�
��4�
�

��
�
��(�
�

�7��
�
��Q|	��~t
7�t
7�n*�!5�*�$;�0�����M�N�
8�O�
8�/r

Youez - 2016 - github.com/yon3zu
LinuXploit