Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
test_sdist.cpython-313.pyc292 linesDownload Raw Back to __pycache__
1�

2`j(��	�p�SrSSKrSSKrSSKrSSKrSSKrSSKrSSKrSSKrSSK	r	SSK3Jr SSKJr SSK
Jr SSKrSSKrSSKJrJr SSKJr SSKJr SS	KJr SS4KJr SSKJr SSKJ r  S
SK!J"r" SSK#r#SSK$J%r% SSS/SS/0S\RLROSS5/4/S.r(S\(<S3r)\"S\RLROSS5/\RLROSS5/S9r*\*RV\*RX-r-\R\S5r/Sr0Sr1S r2S!r3\RhRk\3"5S"S#9r6\RhRoS$S%S#9r8\RhRo\#RrRuS&5(+S'S#9r;S(r<S)r="S*S+5r>S,r?"S-S.5r@S/rAS0rBg)1zsdist tests�N��cleandoc)�Path)�mock)�Command�SetuptoolsDeprecationWarning)�metadata)�manifest_maker)�sdist)�Distribution)�	Extension)�
fail_on_ascii�)�	Filenames)�	run_setup�5sdist_testz0.0z*.txt�data�d�e.dat)�name�version�packages�package_data�6data_filesz&from setuptools import setup7 8setup(**z)9�sdist_test.fzf.c�f.h�r�sources�dependsc#�0# �[R[Rp[R"5[R"5s[l[lSv� Xs[l[lg!Xs[l[lf=f7f�N)�sys�stdout�stderr�io�StringIO)�10old_stdout�11old_stderrs  �MD:\code\apps\devtools\python\Lib\site-packages\setuptools/tests/test_sdist.py�quietr*6sT��� �Z�Z����12��[�[�]�B�K�K�M��C�J��13�8�
�!+���14�C�J�����15�C�J�s�AB� A;�$B�;B�Bc���[U[5(d/UR[RRS5S5$UR[RS5$)N�ascii�/�/)�16isinstance�str�replace�os�sep�encode��paths r)�posixr7AsB���d�C� � ��|�|�B�F�F�M�M�'�2�D�9�9��|�|�B�F�F�C�(�(�c���[U[5(a[R"SU5$UR	S5n[R"SU5nURS5nU$![a U$f=f)N�NFD�utf-8)r/r0�unicodedata�	normalize�decoder4�UnicodeErrorr5s r)�	decomposer@Isu���$�����$�$�U�D�1�1�
��{�{�7�#���$�$�U�D�1���{�{�7�#���K���
���K�
�s�9A)�)17A7�6A7c�p�[US5nUR5sSSS5 $!,(df   g=f)N�rb)�open�read)�filename�fps  r)�read_all_bytesrGUs#��	
�h��	���w�w�y�18�	�	�s�'�195c���[R"[RS9up[R20"U5 [R"U5 g![a gf=f)N)�suffixT)�tempfile�mkstempr�latin_1r2�close�remove�	Exception)�descrEs  r)�latin1_failrQZsH���!�)�)��1B�1B�C���21�����22�	�	�(�������s�AA�23A �A z)System does not support latin-1 filenames)�reasonz%os.environ.get('PYTEST_XDIST_WORKER')zpytest-dev/pytest-xdist#843�24setuptoolsz/the test is not supported with stdlib distutilsc�:�[US5R5 U$)N�wb)rCrMr5s r)�touchrVss����t������Kr8c��[R"X5 U$![[4a [R25"S5 gf=f)Nzsymlink not supported in OS)r2�symlink�OSError�NotImplementedError�pytest�skip)�src�dsts  r)�symlink_or_skip_testr_xsA���26�27�28�3���J��
�(�)�����1�2���s��&A�Ac��\rSrSr\R29"SS9S5rSrSrSr	Sr30S	rS31rSr
SS
SSS.r\\R R#S\R%55S55rSrSrSrSrSrSr\S5r\S5r\S5r\S5r\ S5r!\\ S55r"\#S5r$\ \S 55r%S!S"S#S$S%.r&\R R#S&\&R%55\R ROS'5S(55r(S)r)S*r*S+r+\R RYS,5S-5r-S.r.g/)0�
TestSdistTest�T)�autousec#�# �US-nUR5 US-R[SS9 US-nUR5 US-nUR5 SHn[X$-5 M [US-5 [Hn[X-5 M UR5 Uv� SSS5 g!,(df   g=f7f)	N�project_root�setup.pyr;��encodingrr)z__init__.py�a.txt�b.txt�c.rstr)�mkdir�32write_text�SETUP_PYrV�EXTENSION_SOURCES�as_cwd)�self�tmpdir�test_pkg�data_folder�fnames     r)�33source_dir�TestSdistTest.source_dir�s�����.�(������	�*�	�(�(��G�(�D��L�(�������s�l������@�E��(�"�#�@�
�k�G�#�$�'�E��&�.�!�'��]�]�_��L��_�_�s�B%C�'B5�,	C�534C�?Cc�`�URRn[RR	SS5U;de[RR	SS5U;de[RR	SS5U;de[RR	SS5U;deg)Nrrirjrkrr)�filelist�filesr2r6�join)rq�cmd�manifests   r)�assert_package_data_in_manifest�-TestSdistTest.assert_package_data_in_manifest�s����<�<�%�%���w�w�|�|�L�'�2�h�>�>�>��w�w�|�|�L�'�2�h�>�>�>��w�w�|�|�L�'�2�(�B�B�B��w�w�|�|�C��)�X�5�5�5r8c���0[ES[/0En[U5nSUl[	U5nUR5 [
5 UR5 SSS5 U$!,(df   U$=f)N�ext_modulesrf)�SETUP_ATTRS�	EXTENSIONr�script_namer�ensure_finalizedr*�run�rq�setup_attrs�distr|s    r)�setup_with_extension�"TestSdistTest.setup_with_extension�se��A��A�m�i�[�A���K�(��%����D�k������
�W��G�G�I���35��W��36�s�	A$�$37A3c���[[5nSUl[U5nUR	5 [5 UR
5 SSS5 URU5 g!,(df   N =f)z�Regression test for pull request #4: ensures that files listed in38package_data are included in the manifest even if they're not added to39version control.40rfN)rr�r�rr�r*r�r~)rqr�r|s   r)�test_package_data_in_sdist�(TestSdistTest.test_package_data_in_sdist�sV���K�(��%����D�k������
�W��G�G�I��	
�,�,�S�1��W�s�A'�'41A5c��0[ESS0EnUS(de[U5nSUl[U5nUR	5 [5 UR
5 SSS5 URU5 g!,(df   N =f)z=42Ensure package_data and include_package_data work43together.44�include_package_dataTrrfN)r�rr�rr�r*r�r~r�s    r)�3test_package_data_and_include_package_data_in_sdist�ATestSdistTest.test_package_data_and_include_package_data_in_sdist�sw��45D��C�&<�d�C���>�*�*�*��K�(��%����D�k������
�W��G�G�I��	
�,�,�S�1��W�s�A;�;46B	c��UR5nURU5 URRn[H47nX2;aM48e g)zu49Ensure that the files listed in Extension.sources and Extension.depends50are automatically included in the manifest.51N)r�r~ryrzro)rqr|r}r6s    r)�test_extension_sources_in_sdist�-TestSdistTest.test_extension_sources_in_sdist�sE��52�'�'�)���,�,�S�1��<�<�%�%��%�D��#�#�#�&r8c���[Hn[R"U5 M UR5nUR	U5 UR53Rn[H54nX;aM55e g)z�56Similar to test_extension_sources_in_sdist but the referenced files don't exist.57Missing files should not be included in distribution (with no error raised).58N)ror2rNr�r~ryrz)rqr6r|r}s    r)�test_missing_extension_sources�,TestSdistTest.test_missing_extension_sources�s\��59&�D��I�I�d�O�&��'�'�)���,�,�S�1��<�<�%�%��%�D��'�'�'�&r8c���/n[H|n[RRU5up4US-U-n[R"X%5 [[RR
U5U5 URU5 M~ UR5nURU5 URRn[H60nX';aM61e UH62nX';aM63e g)z�64Similar to test_extension_sources_in_sdist but the referenced files are65instead symbolic links to project-local files. Referenced file paths66should be included. Symlink targets themselves should NOT be included.67z_target.N)ror2r6�splitext�renamer_�basename�appendr�r~ryrz)rq�	symlinkedr6�base�ext�targetr|r}s        r)� test_symlinked_extension_sources�.TestSdistTest.test_symlinked_extension_sources�s����	�%�D����(�(��.�I�D��J�&��,�F��I�I�d�#� ����!1�!1�&�!9�4�@����V�$�
&��'�'�)���,�,�S�1��<�<�%�%��%�D��#�#�#�&��D��'�'�'�r8c�|�[RR[RRSS55$)Nrr)r2r6�abspathr{�r8r)�<lambda>�TestSdistTest.<lambda>s ��B�G�G�O�O�B�G�G�L�L��u�4U�$Vr8c�F�[RRSSSS5$)Nr�..r�r2r6r{r�r8r)r�r�s��B�G�G�L�L��$��e�-68r8c�B�[RRSS5$)Nrzthis_file_does_not_exist.hr�r�r8r)r�r�s��������6�"69r8c�h�[[[RR	SS55S5$)Nr�zoutside_of_project_root.hz	symlink.h)r_rVr2r6r{r�r8r)r�r�	s%��3G��"�'�'�,�,�t�%@�A�B��470r8)zmust be relativezcan't have `..` segmentsz
doesn't existzmust be inside the project rootrRc���URU"5n[S/U/S9n0[ESU/0En[U5nSUl[U5nUR
5 [5 UR[R5 UR5 SSS5 SSS5 URU5 URRnX8;deURV	V71Vs/sH-up�nU	S:XdMU72[R:XdM$X;;dM+UPM/ nn73n	n[!U5S:XdeUunX;deg!,(df   N�=f!,(df   N�=fs snn74n	f)a�75Due to backwards compatibility reasons, `Extension.depends` should accept76invalid/weird paths, but then ignore them when building a sdist.77 78This test verifies that the source distribution is still built79successfully with such paths, but that instead of adding these paths to80the manifest, we emit an informational message, notifying the user that81the invalid path won't be automatically included.82rrr�rfN�rootr)�_INVALID_PATHSr
r�rr�rr�r*�at_level�logging�INFOr�r~ryrz�
record_tuples�len)
rqrR�caplog�invalid_path�	extensionr�r�r|r}�logger�level�message�expected_messages
             r)�test_invalid_extension_depends�,TestSdistTest.test_invalid_extension_dependssJ���*�*�6�2�4�����!�N�83�	�84B��A�m�i�[�A���K�(��%����D�k������
�W�f�o�o�g�l�l�3��G�G�I�4�W�	
�,�,�S�1��<�<�%�%���+�+�+�-3�,@�,@�85�,@�(����&� �
��W�\�\�)�	
�86!�+�
�,@�	�87��#�$��)�)�)�.��	��)�)�)�%4�3��W�W��88s<�% E89�D9�E90�$
E�5E�E�E�991E	�E92�93 94Ec�p^�SSKJn [R"5m"U4SjSU5n0[ESS0EnUS(de[U5nSUl[U5nUR5 S	U0Ul	S	U0URl	URRS	5U:XdeS95n[5 [R"[US9 UR!5 SSS5 SSS5 TR#5 UR%U5 g!,(df   N8=f!,(df   NA=f)
zY96Ensure projects defining custom build_py don't break97when creating sdists (issue #2849)98r)�build_pyc�0>^�\rSrSrSrUU4SjrSrU=r$)�9TestSdistTest.test_custom_build_py.<locals>.CustomBuildPyiEz@99Some projects have custom commands inheriting from `distutils`100c�.>�T"5 [TU]5$r!)�super�get_data_files)rq�	__class__�using_custom_command_guards ��r)r��HTestSdistTest.test_custom_build_py.<locals>.CustomBuildPy.get_data_filesJs���*�,��w�-�/�/r8r�)�__name__�101__module__�__qualname__�__firstlineno__�__doc__r��__static_attributes__�
__classcell__)r�r�s@�r)�
CustomBuildPyr�Es���
�
0�
0r8r�r�Trrfr�zsetuptools instead of distutils)�matchN)�distutils.command.build_pyr�r�Mockr�rr�rr��cmdclass�distribution�get_command_classr*r[�warnsrr��
assert_calledr~)rq�OrigBuildPyr�r�r�r|�msgr�s       @r)�test_custom_build_py�"TestSdistTest.test_custom_build_py<s����102	G�%)�Y�Y�[�"�	0�K�	0�D��C�&<�d�C���>�*�*�*��K�(��%����D�k������#�M�2���%/��$?����!����1�1�*�=��N�N�N�/��
�W�f�l�l�#?�s�K��G�G�I�L�W�	#�0�0�2��,�,�S�1�	L�K��W�W�s$�9D'�D�$D'�103D$	� D'�'104D5c�105�[[5nSUl[U5nUR	5 [5 UR
5 SSS5 URRnSU;deg!,(df   N-=f�N�foo.pyrf)	rr�r�rr�r*r�ryrz�rqr�r|r}s    r)�test_setup_py_exists�"TestSdistTest.test_setup_py_existsbsc���K�(��#����D�k������
�W��G�G�I���<�<�%�%���X�%�%�%�	�W�s�A4�4106Bc�~�[[5nSUl[U5nUR	5 [107RRS5(a[108R"S5 [5 UR5 SSS5 URRnSU;deg!,(df   N-=fr�)
rr�r�rr�r2r6�existsrNr*r�ryrzr�s    r)�test_setup_py_missing�#TestSdistTest.test_setup_py_missingns����K�(��#����D�k������
�7�7�>�>�*�%�%��I�I�j�!�
�W��G�G�I���<�<�%�%����)�)�)�	�W�s�6B.�.109B<c�v�[SSSS9nURS5 SSS5 [[5nSUl[U5nUR
5 [5 UR5 SSS5 URRnSU;deg!,(df   N�=f!,(df   N>=f)N�MANIFEST.in�wr;rgzexclude setup.pyr�rf)rC�writerr�r�rr�r*r�ryrz)rq�
manifest_filer�r|r}s     r)�test_setup_py_excluded�$TestSdistTest.test_setup_py_excluded|s���
�-��w�
7�=���� 2�3�8��K�(��#����D�k������
�W��G�G�I���<�<�%�%����)�)�)�8�
7���W�s�B�!B*�110B'�*111B8c��[US-5 [US-5 [[5nSUl[	U5nUR5 [
5 UR5 SSS5 [SURR5nSU;dU5eSU;dU5eSU;dU5eg!,(df   NW=f)z~112Make sure default files (README.*, etc.) are added in a case-sensitive113way to avoid problems with packages built on Windows.114z115readme.rstz	SETUP.cfgzsetup.PYNc�"�UR5$r!)�lower)�xs r)r��>TestSdistTest.test_defaults_case_sensitivity.<locals>.<lambda>�s116�����r8rfz	setup.cfg)rVrr�r�rr�r*r��mapryrz�rqrvr�r|r}s     r)�test_defaults_case_sensitivity�,TestSdistTest.test_defaults_case_sensitivity�s���	�j�<�'�(�
�j�;�&�'��K�(��&����D�k������
�W��G�G�I���*�C�L�L�,>�,>�?���8�+�5�X�5�+���)�3�8�3�)��(�*�4�H�4�*��W�s�B:�:117Cc��SSSSSSSS.nSSSS.n0UEUER5HAupE[X5RRSSS9 [X5R	USS9 MC UR5nUR
U5 URRVs1sH"owR[RS	5iM$ nnUH6n	[RRU	5(deX�;aM0X�45e UH6n	[RRU	5(deX�;aM0X�45e gs snf)118NzJglobal-include LICEN[CS]E* COPYING* NOTICE* AUTHORS*119global-include *.txt120�)r�zBtest/.venv/lib/python3.9/site-packages/bar-2.dist-info/AUTHORS.rstzDsrc/.nox/py/lib/python3.12/site-packages/bar-2.dist-info/COPYING.txtzEdoc/.tox/default/lib/python3.11/site-packages/foo-4.dist-info/LICENSEz.venv-requirements.txtz.tox-coveragerc.txtz.noxy/coveragerc.txt)zA.tox/release/lib/python3.11/site-packages/foo-4.dist-info/LICENSEz@.nox/py/lib/python3.12/site-packages/bar-2.dist-info/COPYING.txtz=.venv/lib/python3.9/site-packages/bar-2.dist-info/AUTHORS.rstT)�parents�exist_okr;rgr.)�itemsr�parentrlrmr�r~ryrzr1r2r3r6r�)121rqrv�included�excluded�file�contentr|�fr}r6s122          r)�#test_exclude_dev_only_cache_folders�1TestSdistTest.test_exclude_dev_only_cache_folders�sP��)�123SU�TV�UW�&(�#%�$&�124��(RT�PR�MO�125��6��5�H�5�;�;�=�M�D���"�)�)�/�/��t�/�L���"�-�-�g��-�H�>��'�'�)���,�,�S�1�47�L�L�4F�4F�G�4F�q�I�I�b�f�f�c�*�4F��G��D��7�7�>�>�$�'�'�'�'��'�9�$�)9�9�'���D��7�7�>�>�$�'�'�'�'��#�5�d�%5�5�#���	Hs�#)Ec�>�[[5nSUl[U5n[R126R
SS5Ul[R"S5 [R127R
SS5n[U5 [5 UR5 URRU5 UR5 SSS5 [UR5nUR!S5n[#U5U;deg!,(df   NF=f)Nrf�sdist_test.egg-info�SOURCES.txtru
smörbröd.py�UTF-8)rr�r�r128r2r6r{r}rlrVr*r�ryr��write_manifestrGr>r7)rqr��mmrE�contents�129u_contentss      r)�+test_manifest_is_written_with_utf8_encoding�9TestSdistTest.test_manifest_is_written_with_utf8_encoding�s����K�(��%���
�D�
!���g�g�l�l�#8�-�H���130���&�'��7�7�<�<��o�>��	�h���W��F�F�H��K�K���x�(������131"�"�+�+�.���_�_�W�-�132��X��*�,�,�,��W�s�<D�133Dc���[[5nSUl[U5n[R134R
SS5Ul[R"S5 [R135R
S[R5n[U5 [5 UR5 URS5nURR R#U5 UR%5 SSS5 ['UR5nURS5 [)U5U;deWURR ;deg!,(df   Nb=f)Nrfrr�136sdist_testr;r)rr�r�r137r2r6r{r}rlr�utf_8rVr*r�r>ryrzr�rrGr7�rqr�r	rE�138u_filenamer139s      r)�)test_write_manifest_allows_utf8_filenames�7TestSdistTest.test_write_manifest_allows_utf8_filenames�s���K�(��%���
�D�
!���g�g�l�l�#8�-�H���140���&�'��7�7�<�<�
�y���?��	�h���W��F�F�H�!����1�J��K�K���$�$�Z�0������"�"�+�+�.��	���� ��X��(�*�*�*��R�[�[�.�.�.�.�.�!�W�s
� AE�141E!c��[[5nSUl[U5n[R142R
SS5Ul[R"S5 [R143R
S[R5n[5 UR5 URSS5nURRU5 UR!5 SSS5 [#UR5nURS5 [%U5U;deWURR&;deg!,(df   Nb=f)	z�144Files that cannot be encoded to UTF-8 (specifically, those that145weren't originally successfully decoded and have surrogate146escapes) should be omitted from the manifest.147See https://bitbucket.org/tarek/distribute/issue/303 for history.148rfrrrr;�surrogateescapeNr)rr�r�r149r2r6r{r}rlrrLr*r�r>ryr�rrGr7rzrs      r)�,test_write_manifest_skips_non_utf8_filenames�:TestSdistTest.test_write_manifest_skips_non_utf8_filenames
s����K�(��%���
�D�
!���g�g�l�l�#8�-�H���150���&�'��7�7�<�<�
�y�/@�/@�A���W��F�F�H�!����2C�D�J��K�K���z�*������"�"�+�+�.��	���� ��X��h�.�.�.�����!2�!2�2�2�2�!�W�s
�AD?�?151E
c���[[5nSUl[U5nUR	5 [5 UR
5 SSS5 [RRS[R5n[RRSS5Ul[URS5nURSU-5 UR5 [!U5 /UR"l[5 UR'5 SSS5 UR)S5nX2R"R$;deg!,(df   GN=f!,(df   NM=f)Nrfrrr�ab�152r;)rr�r�rr�r*r�r2r6r{rrr}rCr�rMrVryrz�
read_manifestr>�rqr�r|rEr}s     r)�(test_manifest_is_read_with_utf8_encoding�6TestSdistTest.test_manifest_is_read_with_utf8_encoding1s����K�(��%����D�k�������W��G�G�I���7�7�<�<�
�y���?���w�w�|�|�$9�=�I�������d�+�����u�x�'�(�����	�h�� �����
�W�������?�?�7�+���<�<�-�-�-�-�-�)�W���W���E�E �153E� 154E.c���[[5nSUl[U5nUR	5 [5 UR
5 SSS5 [RRS[R5n[RRSS5Ul[URS5nURSU-5 UR5 [!U5 /UR"l[5 UR'5 SSS5 UR)S5nX2R"R$;deg!,(df   GN=f!,(df   NM=f)Nrfrrrrr�latin-1)rr�r�rr�r*r�r2r6r{rrLr}rCr�rMrVryrzrr>rs     r)�+test_read_manifest_skips_non_utf8_filenames�9TestSdistTest.test_read_manifest_skips_non_utf8_filenamesPs���K�(��%����D�k�������W��G�G�I���7�7�<�<�
�y�/@�/@�A���w�w�|�|�$9�=�I�������d�+�����u�x�'�(�����	�h�� �����
�W�������?�?�9�-���|�|�1�1�1�1�1�)�W���W�r c��[UR[55nSUl[	U5nUR5 [RRS[R5n[U5 [5 UR5 SSS5 [RS:Xa[!U5n[R""5n[RS:Xa`US:Xa-UR%S5nX2R&R(;degUR%S5nX2R&R(;degUR%S5nX2R&R(;deg!,(df   N�=f)Nrfr�darwin�win32�cp1252�mbcsr;)r�make_stringsr�r�rr�r2r6r{rrrVr*r�r"�platformr@�getfilesystemencodingr>ryrz�rqr�r|rE�fs_encs     r)�%test_sdist_with_utf8_encoded_filename�3TestSdistTest.test_sdist_with_utf8_encoded_filenameos���D�-�-�k�:�;��%����D�k�������7�7�<�<�
�y���?��
�h��
�W��G�G�I���<�<�8�#� ��*�H��*�*�,���<�<�7�"���!�#�?�?�8�4���<�<�#5�#5�5�5�5�#�?�?�6�2���<�<�#5�#5�5�5�5����w�/�H��|�|�1�1�1�1�1�%�W�s�E2�2155Fc��[U[5(a4UR5VVs0sHup#X RU5_M snn$[U[5(a[	[URU55$[
U5$s snnfr!)r/�dictr�r*�listr�r0)�cls�item�key�values    r)r*�TestSdistTest.make_strings�so���d�D�!�!�CG�:�:�<�P�<�Z�S�C�)�)�%�0�0�<�P�P��d�D�!�!���C�,�,�d�3�4�4��4�y���Qs�B	c��[UR[55nSUl[	U5nUR5 [RRS[R5n[U5 [RRU5(de[5 UR5 SSS5 [R S:XaJ[R""5nUS:waSnUR%U5nX2R&R(;degUR%S5nX2R&R(;deg!,(df   N�=f)Nrfrr'r)r")rr*r�r�rr�r2r6r{rrLrV�isfiler*r�r"r+r,r>ryrzr-s     r)�'test_sdist_with_latin1_encoded_filename�5TestSdistTest.test_sdist_with_latin1_encoded_filename�s���D�-�-�k�:�;��%����D�k�������7�7�<�<�
�y�/@�/@�A��
�h���w�w�~�~�h�'�'�'�'�
�W��G�G�I���<�<�7�"��.�.�0�F����"�����v�.�H��|�|�1�1�1�1�1� ���y�1�H��<�<�#5�#5�5�5�5�!�W�s�*E�156Ez�157            [metadata]158            name = testing159            version = file: src/VERSION.txt160            license_files = DOWHATYOUWANT161            long_description = file: README.rst, USAGE.rst162            a163164            [project]165            name = "testing"166            readme = "USAGE.rst"167            license-files = ["DOWHATYOUWANT"]168            dynamic = ["version"]169            [tool.setuptools.dynamic]170            version = {file = ["src/VERSION.txt"]}171            a172            [project]173            name = "testing"174            readme = "USAGE.rst"175            license-files = ["DOWHATYOUWANT"]176            dynamic = ["version"]177            [tool.setuptools.dynamic]178            version = {file = "src/VERSION.txt"}179            a	180            [project]181            name = "testing"182            readme = "USAGE.rst"183            license = {file = "DOWHATYOUWANT"}184            dynamic = ["version"]185            [tool.setuptools.dynamic]186            version = {file = "src/VERSION.txt"}187            )z(setup.cfg - long_description and versionz@pyproject.toml - static readme/license files and dynamic versionz3pyproject.toml - directive with str instead of listz9pyproject.toml - deprecated license table with file entry�configz6ignore:.project.license. as a TOML table is deprecatedc�`�URS5un nURUnUS-R5 US-RSSS9 US-RSSS9 US	-RSSS9 US188-RSSS9 X-RUSS9 [	S/05nSUlUR
5 [U5nUR5 [5 UR5 SSS5 SURR;dS
URR;deS	URR;deS189URR;deSURR;deSURR;deg!,(df   N�=f)Nz - r]zsrc/VERSION.txtz0.42r;rgz190README.rstzhello world!z	USAGE.rst�
DOWHATYOUWANTrrfzsrc\VERSION.txtr.�\)
�	partition�_EXAMPLE_DIRECTIVESrlrmrr��parse_config_filesrr�r*r�ryrz)rqrvr=�config_file�_�config_textr�r|s        r)�.test_add_files_referenced_by_config_directives�<TestSdistTest.test_add_files_referenced_by_config_directives�s���191#�,�,�U�3���Q���.�.�v�6��	�e�	�"�"�$�	�'�	'�3�3�F�W�3�M�	�l�	"�.�.�~��.�P�	�k�	!�-�-�n�w�-�O�	�o�	%�1�1�.�7�1�S�	�	!�-�-�k�G�-�L��Z��,�-��%������!��D�k������
�W��G�G�I��
����!3�!3�3�!�S�\�\�%7�%7�7�	192�
8��c�l�l�0�0�0�0�0��#�,�,�"4�"4�4�4�4��#�,�,�,�,�,�,�,��3�<�<�-�-�-�-�-��W�s�F�193F-c�&�[US-5 [[5nSUl[	U5nUR5 [
5 UR5 SSS5 URRnSU;deg!,(df   N-=f)zG194Check if pyproject.toml is included in source distribution if present195�pyproject.tomlrfN)196rVrr�r�rr�r*r�ryrzr�s     r)�test_pyproject_toml_in_sdist�*TestSdistTest.test_pyproject_toml_in_sdist�sq��	�j�+�+�,��K�(��%����D�k������
�W��G�G�I���<�<�%�%���8�+�+�+��W�s�197B�198Bc��[US-5 [SSSS9n[SUS9 SSS5 [[5nS	Ul[
U5nUR5 [5 UR5 SSS5 URRnSU;deg!,(df   N�=f!,(df   N>=f)199z8200Check that pyproject.toml can excluded even if present201rJr�r�r;rgzexclude pyproject.toml)r�Nrf)rVrC�printrr�r�rr�r*r�ryrz)rqrv�mtsr�r|r}s      r)�test_pyproject_toml_excluded�*TestSdistTest.test_pyproject_toml_excluded202s���	�j�+�+�,�
�-��w�
7�3��*��5�8��K�(��%����D�k������
�W��G�G�I���<�<�%�%���x�/�/�/�8�
7���W�s�B �(B1� 203B.�1204B?c���[US-5 [0[ESS0E5n[U5nUR	5 [5 UR
5 SSS5 URRnSU;de[0[ESS0E5nURS5n/URQSPUl205"SS[5nURRUS9 [U5nS	UlUR	5 [5 UR
5 SSS5 URRnSU;deg!,(df   N�=f!,(df   N>=f)206N�.myfile~r�rf�build)�build_customNc�,�\rSrSrSrSrSrSrSrg)�FTestSdistTest.test_build_subcommand_source_files.<locals>.build_customi+c��gr!r��rqs r)�initialize_options�YTestSdistTest.test_build_subcommand_source_files.<locals>.build_custom.initialize_options,s��#r8c��gr!r�rYs r)�finalize_options�WTestSdistTest.test_build_subcommand_source_files.<locals>.build_custom.finalize_options.s��r8c��gr!r�rYs r)r��JTestSdistTest.test_build_subcommand_source_files.<locals>.build_custom.run0s��3r8c��S/$)NrSr�rYs r)�get_source_files�WTestSdistTest.test_build_subcommand_source_files.<locals>.build_custom.get_source_files2s207��"�|�#r8r�N)	r�r�r�r�rZr]r�rbr�r�r8r)rUrW+s��-�+��
$r8rU)rUT)rVrr�rr�r*r�ryrz�get_command_obj�sub_commandsrr��update�use_defaults)rqrvr�r|r}rTrUs       r)�"test_build_subcommand_source_files�0TestSdistTest.test_build_subcommand_source_filess/��
�j�:�%�&��F�{�F�M�:�F�G���D�k������
�W��G�G�I���<�<�%�%����)�)�)��F�{�F�M�:�F�G���$�$�W�-��J�u�1�1�J�3I�J���	$�7�	$�	
�
�
���,��7��D�k���������
�W��G�G�I���<�<�%�%���X�%�%�%�9�W��2�W�s�	E�E�208E�209E&z6os.environ.get('SETUPTOOLS_USE_DISTUTILS') == 'stdlib'c	���[0[ESSS[R"S500S.E5n[	U5nUR5 [
5 UR5 SSS5 g!,(df   g=f)zC210Ensure if build_base is a pathlib.Path, the build still succeeds.211rfrT�212build_base)r��optionsN)rr��pathlibrrr�r*r�)rqrvr�r|s    r)�test_build_base_pathlib�%TestSdistTest.test_build_base_pathlib?sh��213�214��215�%��,����W�0E�!F�G�216���217�D�k������
�W��G�G�I��W�W�s�A.�.218A<r�N)/r�r�r�r�r[�fixturervr~r�r�r�r�r�r�r��skip_under_stdlib_distutils�mark�parametrize�keysr�r�r�r�r�r�rrrr�skip_under_xdistrr� fail_on_latin1_encoded_filenamesr#r/�classmethodr*r;rB�filterwarningsrGrKrPrh�skipifrnr�r�r8r)rara�s���^�^�D�!��"��06��2� 2�$	$�(�(�0W�%219�220�,221��N�!��[�[���X�~�':�':�'<�=�)*�>�!�)*�V$2�L222&�*�
*�5�8&6�P�-��-�8�/��/�@�!3��!3�F�.��.�<&�2�&�2�<�%�2�&��2�<����&��6��&�6�>5�M�@�F�5#��J�[�[���X�':�'?�'?�'A�B��[�[���@��.��C�.�8,�0� #&�J�[�[���P�Q��R�r8rac��[RRS5unUR5n[	US5(deg)a�223When _default_revctrl was removed from the `setuptools.command.sdist`224module in 10.0, it broke some systems which keep an old install of225setuptools (Distribute) around. Those old versions require that the226setuptools package continue to implement that interface, so this227function provides that interface, stubbed. See #320 for details.228 229This interface must be maintained until Ubuntu 12.04 is no longer230supported (by Setuptools).231zg232        [setuptools.file_finders]233        svn_cvs = setuptools.command.sdist:_default_revctrl234        �__iter__N)r	�EntryPoints�235_from_text�load�hasattr)�ep�ress  r)�test_default_revctrlr�OsA��
� � �+�+�	�
�E�R�
�'�'�)�C��3�236�#�#�#�#r8c���\rSrSrSr\S5r\RRSS5S5r237\S5r\RRSS5S	5rS238r
g)�TestRegressionsidzd239Can be removed/changed if the project decides to change how it handles symlinks240or external files.241c�8�SSS00[SU<S35SSS.S.$)	N�dir�file.hr��[242                    from setuptools import Extension, setup243                    setup(244                        name="myproj",245                        version="42",246                        ext_modules=[247                            Extension(248                                "hello", sources=["hello.pyx"],249                                depends=[�e]250                            )251                        ],252                    )253                    �global-include *.h�rfz	hello.pyxr���external�projectr)�tmp_path�dep_paths  r)�&files_for_symlink_in_extension_depends�6TestRegressions.files_for_symlink_in_extension_dependsjsI����"�~��%�*�+3��6��� �3�#�	254�	255r8r�)zmyheaders/dir/file.hzmyheaders/dir/../dir/file.hc���URX#5n[RRU[	U5S9 [US-US-5 [
XS-5nSH256nXe;aM257e g)N��prefixr�zproject/myheadersr�)zmyproj-42/hello.pyxzmyproj-42/myheaders/dir/file.h)r��jaracor6rTr0r_�	run_sdist)rq�monkeypatchr�r�rz�members�expecteds       r)�!test_symlink_in_extension_depends�1TestRegressions.test_symlink_in_extension_depends�so��258�;�;�H�O�������%��H�
��6��X�259�2�H�?R�4R�S��K�I�)=�>��260�H��&�&�&�	261r8c��URS5up#nU(aX-OUnSSS00[S[U5<S35SSS.S	.$)262Nz$tmp_path$/r�r�r�r�r�r�r�r�)rArr0)r�r��headrE�tails     r)�,files_for_external_path_in_extension_depends�<TestRegressions.files_for_external_path_in_extension_depends�sm�� �*�*�=�9�
���&*�8�?�����"�~��%�*�+.�h�-�):�;��� �3�#�	263�	264r8)z$tmp_path$/external/dir/file.hz../external/dir/file.hc��URX#5n[RRU[	U5S9 [XS-5nUHnSU;aMe g)Nr�r�r�)r�r�r6rTr0r�)rqr�r�r�rzr�rs       r)�'test_external_path_in_extension_depends�7TestRegressions.test_external_path_in_extension_depends�sV��265�A�A�(�U�������%��H�
��6��K�I�)=�>���D��4�'�'�'�r8r�N)r�r�r�r�r��staticmethodr�r[rrrsr�r�r�r�r�r8r)r�r�ds����266�267��268�4�[�[����K��
'��
'��269��270�:�[�[����P��(��(r8r�c�f�URU5 [5 [SS/5 SSS5 [US-R	S55n[271R"[U55n[UR55sSSS5 $!,(df   Nm=f!,(df   g=f)z@Given a project directory, run the sdist and return its contentsrfrNr�z*.tar.gz)272�chdirr*r�next�glob�tarfilerCr0�set�getnames)r�r��archive�tars    r)r�r��s{�����g��	���*�w�i�(�273��G�f�$�*�*�:�6�7�G�	���c�'�l�	#�s��3�<�<�>�"�274$�	#�	275���276$�	#�s�B�.B"�277B�"278B0c���[R"U5nUR5nSSS5 WVs/sH
nSU;dMUPM nn[U5S:Xd279SU35eg!,(df   NB=fs snf)Nz.toxrz280not empty )r�rCr�r�)�setuptools_sdistr�rzr�	tox_filess     r)�&test_sanity_check_setuptools_own_sdistr��sh��	���&�	'�3������281(�#(�:�%�$�6�T�>��%�I�:��y�>�Q��8�*�Y�K� 8�8��282(�	'��;s�A$�283A5�A5�$284A2)Cr��285contextlibr%r�r2rmr"r�rJr<�inspectrr�unittestr�jaraco.pathr�r[rSrr�setuptools._importlibr	�setuptools.command.egg_infor286�setuptools.command.sdistr�setuptools.distr�setuptools.extensionr
�setuptools.testsr�textr�	distutils�distutils.corerr6r{r�rnr�rrro�contextmanagerr*r7r@rGrQrr�xfailrvryru�__package__�287startswithrqrVr_rar�r�r�r�r�r8r)�<module>r�s�����	��	��288��������
�<�*�6�*�(�*�*���$�
����!�G�9�-��R�W�W�\�\�#�w�7�8�9�:���	�289�����
�	�
�W�W�\�\�,��
.�/�
�W�W�\�\�,��
.�/�
�	�290�%�%�	�(9�(9�9�����8��8�)�	��291�$*�;�;�#4�#4��M�6�$5�$� ��;�;�%�%�+�(�&���%�k�k�0�0����(�(��6�6�<�1����292�K�K�\$�*\(�\(�~#�9r8
codekingpro/portable-devtools · Team Ai