o
    5‘ði3Z  ã                   @  sF  d dl mZ d dlZd dlZd dlZd dlZd dlZd dlZd dl	Z	d dl
Z
d dlZd dlmZ d dlmZ d dlmZ d dlZd dlZd dlmZ d dlZd dlmZmZ d dlmZ d d	lmZ d d
lm Z  h d£Z!h d£Z"ddhZ#dZ$e$ddidœe% &e"e#B d¡¥edƒddœedƒddidœedƒdddœedƒddddœdœdddiidœed ƒddd!œd"œed#ƒd$d%œed&ƒdd'd(diid)œd*œZ'e
jd+krÖed,ƒd-d.d/œe'd0< d1d2„ Z(d3d4„ Z)ej*d5d6�d7d8„ ƒZ+ej*d9d:„ ƒZ,ej*d;d<„ ƒZ-d=d>„ Z.d?d@„ Z/dAZ0dBdC„ Z1dDdE„ Z2dFdG„ Z3ej4 5dHdIdJdKe$ 6dLdM¡fg¡dNdO„ ƒZ7dPdQ„ Z8dRdS„ Z9dTdU„ Z:dVdW„ Z;dXZ<dYZ=ej4 >dZ¡d[d\„ ƒZ?d]d^„ Z@ej4j5d_eAejB C¡ ƒeAejBƒd`�dadb„ ƒZDdcdd„ ZEdedf„ ZFdgdh„ ZGdidj„ ZHdkdl„ ZIdmdn„ ZJdodp„ ZKdqdr„ ZLdsdt„ ZMej4 5dudvdwg¡ej4jNe O¡ dxkdydz�d{d|„ ƒƒZPd…dd€„ZQd�d‚„ ZRdƒd„„ ZSdS )†é    )ÚannotationsN)Úsuppress)Úcleandoc)ÚZipFile)Útags)Úbdist_wheelÚget_abi_tag)ÚDistribution)ÚSetuptoolsDeprecationWarning)Ú	run_setup>   údummy_dist-1.0.dist-info/WHEELú&dummy_dist-1.0.dist-info/top_level.txtúdummy_dist-1.0.dist-info/RECORDú!dummy_dist-1.0.dist-info/METADATA>
   ú
COPYING.mdú
NOTICE.rstúAUTHORS.txtúLICENCE.txtÚNOTICEÚAUTHORSÚCOPYINGÚLICENCEÚLICENSEúLICENSE.txtzLICENSE~zAUTHORS~zQfrom setuptools import setup

setup(
    name='dummy_dist',
    version='1.0',
)
Ú	DUMMYFILEÚ )úsetup.pyÚlicenses_diru  
            from setuptools import setup

            setup(
                name="simple.dist",
                version="0.1",
                description="A testing distribution â˜ƒ",
                extras_require={"voting": ["beaglevote"]},
            )
            )r   Ú
simpledistui  
            from setuptools import setup

            setup(
                name="complex-dist",
                version="0.1",
                description="Another testing distribution â˜ƒ",
                long_description="Another testing distribution â˜ƒ",
                author="Illustrious Author",
                author_email="illustrious@example.org",
                url="http://example.org/exemplary",
                packages=["complexdist"],
                setup_requires=["setuptools"],
                install_requires=["quux", "splort"],
                extras_require={"simple": ["simple.dist"]},
                entry_points={
                    "console_scripts": [
                        "complex-dist=complexdist:main",
                        "complex-dist2=complexdist:main",
                    ],
                },
            )
            ú__init__.pyzdef main(): return)r   Úcomplexdistzý
            from setuptools import setup

            setup(
                name="headers.dist",
                version="0.1",
                description="A distribution with headers",
                headers=["header.h"],
            )
            )r   zheadersdist.pyzheader.hak  
            from setuptools import setup

            setup(
                name="testrepo",
                version="0.1",
                packages=["mypackage"],
                description="A test package with commas in file names",
                include_package_data=True,
                package_data={"mypackage.data": ["*"]},
            )
            )r   z	1,2,3.txt)r   ÚdataÚ	mypackage)r   r"   ztestrepo-0.1.0u  
            from setuptools import setup

            setup(
                name="unicode.dist",
                version="0.1",
                description="A testing distribution â˜ƒ",
                packages=["unicodedist"],
                zip_safe=True,
            )
            )r   õ   Ã¥Ã¤Ã¶_æ—¥æœ¬èªž.py)r   Úunicodedistuõ   
            [metadata]
            name = utf8-metadata-dist
            version = 42
            author_email = "John X. ÃƒÃ¸rÃ§eÄ�" <john@utf8.org>, Î“Î±Î¼Î± ï­‡ æ�± <gama@utf8.org>
            long_description = file: README.rst
            õ   UTF-8 æ��è¿° èª¬æ˜Ž)ú	setup.cfgz
README.rstz†
            [metadata]
            name = licenses-dist
            version = 1.0
            license_files = **/LICENSE
            Úvendorr   )r&   r   Úsrc)ú
dummy-distzsimple-distzcomplex-distzheaders-distzcommasinfilenames-distzunicode-distzutf8-metadata-distúlicenses-distÚwin32u   
            from setuptools import Extension, setup

            setup(
                name="extension.dist",
                version="0.1",
                description="A testing distribution â˜ƒ",
                ext_modules=[
                    Extension(
                        name="extension", sources=["extension.c"], py_limited_api=True
                    )
                ],
            )
            z![bdist_wheel]
py_limited_api=cp32z5#define Py_LIMITED_API 0x03020000
#include <Python.h>)r   r&   úextension.czabi3extension-distc                  K  s^   t j d¡rtddd�ntddiƒ}| ¡  t|ƒ}|  ¡ D ]
\}}t|||ƒ q| 	¡  |S )zHRun command in the same process so that it is easier to collect coverager   Úinit)Ú
stop_afterÚscript_namez%%build_meta%%)
ÚosÚpathÚexistsr   r	   Úparse_config_filesr   ÚitemsÚsetattrÚfinalize_options)ÚkwargsÚdist_objÚcmdÚattrÚvalue© r<   ú`/root/parts/websockify/install/lib/python3.10/site-packages/setuptools/tests/test_bdist_wheel.pyÚbdist_wheel_cmdØ   s   
ÿ
ýr>   c                 C  s&   |   |¡}tjjt| t|ƒd� |S )N©Úprefix)ÚmktempÚjaracor1   ÚbuildÚEXAMPLESÚstr)Útmp_path_factoryÚnameÚbasedirr<   r<   r=   Ú	mkexampleç   s   
rI   Úsession)Úscopec              	   C  s�   |   d¡}|   d¡}tD ]/}t| |ƒ}|| }tj ¡  |¡� tt|ƒt|ƒd� 	¡  W d   ƒ n1 s6w   Y  qt
dd„ | d¡D ƒƒS )NrC   Údist©Ú	bdist_dirÚdist_dirc                 s  s   � | ]}t |ƒV  qd S ©N©rE   ©Ú.0Úfnamer<   r<   r=   Ú	<genexpr>÷   s   € zwheel_paths.<locals>.<genexpr>z*.whl)rA   rD   rI   rB   r1   ÚDirectoryStackÚcontextr>   rE   ÚrunÚsortedÚglob)rF   Ú
build_baserO   rG   Úexample_dirÚ	build_dirr<   r<   r=   Úwheel_pathsí   s   


ÿ€r^   c                 C  ó
   t | dƒS )Nr)   ©rI   ©rF   r<   r<   r=   Ú
dummy_distú   ó   
rb   c                 C  r_   )Nr*   r`   ra   r<   r<   r=   Úlicenses_distÿ   rc   rd   c                 C  s6   t dd„ | D ƒƒ}t|ƒ ¡ D ]	}d|jvsJ ‚qdS )z0Make sure entry point scripts are not generated.c                 s  ó   � | ]	}d |v r|V  qdS )Úcomplex_distNr<   ©rS   r1   r<   r<   r=   rU     ó   € z"test_no_scripts.<locals>.<genexpr>z.data/scripts/N)Únextr   ÚinfolistÚfilename)r^   r1   Úentryr<   r<   r=   Útest_no_scripts  s   ÿrm   c                 C  sX   t dd„ | D ƒƒ}t|ƒ�}| d¡}W d   ƒ n1 sw   Y  d ¡ |v s*J ‚d S )Nc                 s  re   )Úunicode_distNr<   rg   r<   r<   r=   rU     rh   z&test_unicode_record.<locals>.<genexpr>z!unicode_dist-0.1.dist-info/RECORDr#   )ri   r   ÚreadÚencode)r^   r1   ÚzfÚrecordr<   r<   r=   Útest_unicode_record  s
   
ÿrs   už   Metadata-Version: 2.1
Name: helloworld
Version: 42
Author-email: "John X. ÃƒÃ¸rÃ§eÄ�" <john@utf8.org>, Î“Î±Î¼Î± ï­‡ æ�± <gama@utf8.org>


UTF-8 æ��è¿° èª¬æ˜Ž
c                 C  sš   |   |¡ |d }|d }| ¡  |d jtdd� |d  ¡  G dd„ dtƒ}|ƒ }| ||¡ |d	 jdd�}d
|v s?J ‚d|v sEJ ‚d|v sKJ ‚d S )Nzdummy_dist.egg-infoúdummy_dist.dist-infozPKG-INFOúutf-8©Úencodingzdependency_links.txtc                   @  s&   e Zd ZdZd	dd„Zedd„ ƒZdS )
z;test_preserve_unicode_metadata.<locals>.simpler_bdist_wheelz1Avoid messing with setuptools/distutils internalsÚreturnÚNonec                 S  s   d S rP   r<   ©Úselfr<   r<   r=   Ú__init__*  s   zDtest_preserve_unicode_metadata.<locals>.simpler_bdist_wheel.__init__c                 S  s   g S rP   r<   rz   r<   r<   r=   Úlicense_paths-  s   zItest_preserve_unicode_metadata.<locals>.simpler_bdist_wheel.license_pathsN©rx   ry   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r|   Úpropertyr}   r<   r<   r<   r=   Úsimpler_bdist_wheel'  s
    
r„   ÚMETADATAu"   Author-email: "John X. ÃƒÃ¸rÃ§eÄ�"u   Î“Î±Î¼Î± ï­‡ æ�± r%   )ÚchdirÚmkdirÚ
write_textÚUTF8_PKG_INFOÚtouchr   Úegg2distÚ	read_text)ÚmonkeypatchÚtmp_pathÚegginfoÚdistinfor„   Úcmd_objÚmetadatar<   r<   r=   Útest_preserve_unicode_metadata  s   

r“   c                 C  sp   |  | ¡ tt|ƒd� ¡  tdƒ�}dd„ tD ƒ}t| ¡ ƒt|B ks&J ‚W d   ƒ d S 1 s1w   Y  d S )N©rN   ú$dist/dummy_dist-1.0-py3-none-any.whlc                 S  ó   h | ]}d | ’qS ©z"dummy_dist-1.0.dist-info/licenses/r<   rR   r<   r<   r=   Ú	<setcomp>>  ó    ÿÿz(test_licenses_default.<locals>.<setcomp>)	r†   r>   rE   rX   r   ÚDEFAULT_LICENSE_FILESÚsetÚnamelistÚDEFAULT_FILES©rb   r�   rŽ   ÚwfÚlicense_filesr<   r<   r=   Útest_licenses_default:  s   

þ"ûr¡   c                 C  s|   |   d¡jddd� | | ¡ tt|ƒd� ¡  tdƒ�}dh}t| ¡ ƒt	|B ks,J ‚W d   ƒ d S 1 s7w   Y  d S )Nr&   z.[metadata]
license_file=licenses_dir/DUMMYFILEru   rv   r”   r•   z8dummy_dist-1.0.dist-info/licenses/licenses_dir/DUMMYFILE©
Újoinpathrˆ   r†   r>   rE   rX   r   r›   rœ   r�   rž   r<   r<   r=   Útest_licenses_deprecatedE  s   
ÿ

"þr¤   )Úconfig_fileÚconfig)r&   z1[metadata]
license_files=licenses_dir/*
  LICENSE)r&   z0[metadata]
license_files=licenses_dir/*, LICENSEr   ú)z6  license_files=['licenses_dir/DUMMYFILE', 'LICENSE'])c                 C  s¬   |   |¡j|dd� | | ¡ tt|ƒd� ¡  tdƒ�0}dd„ dD ƒ}t| ¡ ƒt	|B ks0J ‚| 
d¡ d	¡}d
|v s>J ‚d|v sDJ ‚W d   ƒ d S 1 sOw   Y  d S )Nru   rv   r”   r•   c                 S  r–   r—   r<   rR   r<   r<   r=   r˜   d  r™   z)test_licenses_override.<locals>.<setcomp>>   úlicenses_dir/DUMMYFILEr   r   Úutf8z$License-File: licenses_dir/DUMMYFILEúLicense-File: LICENSE)r£   rˆ   r†   r>   rE   rX   r   r›   rœ   r�   ro   Údecode)rb   r�   rŽ   r¥   r¦   rŸ   r    r’   r<   r<   r=   Útest_licenses_overrideR  s   

þ"ør¬   c                 C  s®   |  | ¡ tt|ƒd� ¡  tt d¡ƒ tdƒ�4}dd„ tD ƒ}ddh}t	| 
¡ ƒ||B ks1J ‚| d¡ d	¡}d
|v s?J ‚d|v sEJ ‚W d   ƒ d S 1 sPw   Y  d S )Nr”   rL   z'dist/licenses_dist-1.0-py3-none-any.whlc                 S  s   h | ]}|  d d¡’qS )Údummy_Ú	licenses_)Úreplace)rS   rG   r<   r<   r=   r˜   s  s    z:test_licenses_preserve_folder_structure.<locals>.<setcomp>z,licenses_dist-1.0.dist-info/licenses/LICENSEz7licenses_dist-1.0.dist-info/licenses/src/vendor/LICENSEz$licenses_dist-1.0.dist-info/METADATAr©   z License-File: src/vendor/LICENSErª   )r†   r>   rE   rX   Úprintr0   Úlistdirr   r�   r›   rœ   ro   r«   )rd   r�   rŽ   rŸ   Údefault_filesr    r’   r<   r<   r=   Ú'test_licenses_preserve_folder_structuren  s   

þ"÷r³   c                 C  sr   |   d¡jddd� | | ¡ tt|ƒd� ¡  tdƒ�}t| ¡ ƒt	ks'J ‚W d   ƒ d S 1 s2w   Y  d S )Nr&   z[metadata]
license_files=
ru   rv   r”   r•   r¢   )rb   r�   rŽ   rŸ   r<   r<   r=   Útest_licenses_disabled~  s   
ÿ

"ÿr´   c                 C  sp   |  | ¡ tt|ƒdd� ¡  tdƒ�}t| ¡ ƒ}d|v s J ‚d|v s&J ‚W d   ƒ d S 1 s1w   Y  d S )NÚ2©rN   Úbuild_numberz&dist/dummy_dist-1.0-2-py3-none-any.whlr   r   )r†   r>   rE   rX   r   r›   rœ   )rb   r�   rŽ   rŸ   Ú	filenamesr<   r<   r=   Útest_build_numberˆ  s   

"ýr¹   c                 C  s`   |  | ¡ tjtdd�� tt|ƒdd� ¡  W d   ƒ n1 s!w   Y  tj 	d¡s.J ‚d S )Nz.*universal is deprecated©ÚmatchT)rN   Ú	universalz(dist/dummy_dist-1.0-py2.py3-none-any.whl)
r†   ÚpytestÚwarnsr
   r>   rE   rX   r0   r1   r2   )rb   r�   rŽ   r<   r<   r=   Útest_universal_deprecated‘  s
   
ÿr¿   a&  #include <Python.h>

static PyMethodDef methods[] = {
  { NULL, NULL, 0, NULL }
};

static struct PyModuleDef module_def = {
  PyModuleDef_HEAD_INIT,
  "extension",
  "Dummy extension module",
  -1,
  methods
};

PyMODINIT_FUNC PyInit_extension(void) {
  return PyModule_Create(&module_def);
}
uú   from __future__ import annotations

from setuptools import Extension, setup

setup(
    name="extension.dist",
    version="0.1",
    description="A testing distribution â˜ƒ",
    ext_modules=[Extension(name="extension", sources=["extension.c"])],
)
zEonce:Config variable '.*' is unset.*, Python ABI tag may be incorrectc                 C  sh   |  d¡}|d jtdd� |d jtdd� | d¡}| d¡}|  |¡ tt|ƒt|ƒd� ¡  d	S )
z=Test that building a binary wheel with the limited ABI works.Úextension_distr   ru   rv   r,   rC   rL   rM   N)	rA   rˆ   ÚEXTENSION_SETUPPYÚEXTENSION_EXAMPLEr£   r†   r>   rE   rX   )r�   rŽ   rF   Ú
source_dirr]   rO   r<   r<   r=   Útest_limited_abi»  s   



rÄ   c                 C  sn   t | d¡ƒ}t t | ƒ|¡ | |¡ t |¡D ]\}}}|D ]}t tj 	||¡t
j¡ q qtƒ  ¡  d S )NÚdummy)rE   r£   ÚshutilÚcopytreer†   r0   ÚwalkÚchmodr1   ÚjoinÚstatÚS_IREADr>   rX   )rb   r�   rŽ   rH   ÚrootÚ_dirsÚfilesrT   r<   r<   r=   Útest_build_from_readonly_treeÉ  s   
ÿrÐ   )ÚoptionÚcompress_type)Úidsc                 C  sŠ   |  | ¡ tt|ƒ|d� ¡  tdƒ�(}t| ¡ ƒ}d|v s J ‚d|v s&J ‚|jD ]	}|j|ks2J ‚q)W d   ƒ d S 1 s>w   Y  d S )N)rN   Úcompressionr•   r   r   )	r†   r>   rE   rX   r   r›   rœ   ÚfilelistrÒ   )rb   r�   rŽ   rÑ   rÒ   rŸ   r¸   Úzinfor<   r<   r=   Útest_compressionÖ  s   


ÿ"ür×   c              	   C  s`   | D ]+}t |ƒ�}tdd„ |jD ƒƒ}| |¡}d|vsJ ‚W d   ƒ n1 s(w   Y  qd S )Nc                 s  s    � | ]}|j  d ¡r|V  qdS )ÚWHEELN)rk   Úendswith)rS   Úfnr<   r<   r=   rU   é  s   € z.test_wheelfile_line_endings.<locals>.<genexpr>ó   )r   ri   rÕ   ro   )r^   r1   rŸ   Ú	wheelfileÚwheelfile_contentsr<   r<   r=   Útest_wheelfile_line_endingsæ  s   

ý€ÿrÞ   c                 C  sr   |  dd¡ | | ¡ tt|ƒdd� ¡  tdƒ�}|jD ]	}|jdks&J ‚qW d   ƒ d S 1 s2w   Y  d S )NÚSOURCE_DATE_EPOCHÚ0Ú2ar¶   z'dist/dummy_dist-1.0-2a-py3-none-any.whl)i¼  é   râ   r   r   r   )Úsetenvr†   r>   rE   rX   r   rÕ   Ú	date_time)rb   r�   rŽ   rŸ   rÖ   r<   r<   r=   Útest_unix_epoch_timestampsî  s   


ÿ"ÿrå   c                 C  s’   |   tddd„ ¡ |   tddd„ ¡ tƒ dksJ ‚|   tddd„ d	¡ tƒ d
ks*J ‚|   tddd„ ¡ tƒ dks:J ‚|  td¡ tƒ dksGJ ‚d S )NÚinterpreter_namec                   S  ó   dS )NÚcpr<   r<   r<   r<   r=   Ú<lambda>ø  ó    z*test_get_abi_tag_windows.<locals>.<lambda>Úget_config_varc                 S  rç   )Nzcp313-win_amd64r<   ©Úxr<   r<   r=   ré   ù  rê   Úcp313Úgettotalrefcountc                   S  rç   )Nrâ   r<   r<   r<   r<   r=   ré   û  rê   FÚcp313dc                 S  rç   )Nzcp313t-win_amd64r<   rì   r<   r<   r=   ré   ý  rê   Úcp313tdÚcp313t)r5   r   Ú	sysconfigr   ÚsysÚdelattr©r�   r<   r<   r=   Útest_get_abi_tag_windows÷  s   r÷   c                 C  ó6   |   tddd„ ¡ |   tddd„ ¡ tƒ dksJ ‚d S )Nræ   c                   S  rç   ©NÚppr<   r<   r<   r<   r=   ré     rê   z+test_get_abi_tag_pypy_old.<locals>.<lambda>rë   c                 S  rç   )Nzpypy36-pp73r<   rì   r<   r<   r=   ré     rê   Úpypy36_pp73)r5   r   ró   r   rö   r<   r<   r=   Útest_get_abi_tag_pypy_old  ó   rü   c                 C  rø   )Nrë   c                 S  rç   )Nzpypy37-pp73-darwinr<   rì   r<   r<   r=   ré   
  rê   z+test_get_abi_tag_pypy_new.<locals>.<lambda>ræ   c                   S  rç   rù   r<   r<   r<   r<   r=   ré     rê   Úpypy37_pp73©r5   ró   r   r   rö   r<   r<   r=   Útest_get_abi_tag_pypy_new	  rý   r   c                 C  rø   )Nrë   c                 S  rç   )Nz"graalpy231-310-native-x86_64-linuxr<   rì   r<   r<   r=   ré     rê   z*test_get_abi_tag_graalpy.<locals>.<lambda>ræ   c                   S  rç   )NÚgraalpyr<   r<   r<   r<   r=   ré     rê   Úgraalpy231_310_nativerÿ   rö   r<   r<   r=   Útest_get_abi_tag_graalpy  s
   
ÿr  c                 C  rø   )Nrë   c                 S  rç   )Nzunknown-python-310r<   rì   r<   r<   r=   ré     rê   z+test_get_abi_tag_fallback.<locals>.<lambda>ræ   c                   S  rç   )Nzunknown-pythonr<   r<   r<   r<   r=   ré     rê   Úunknown_python_310rÿ   rö   r<   r<   r=   Útest_get_abi_tag_fallback  rý   r  c                 C  s   |  | ¡ tdd� ¡  dS )z>Ensure building on platforms with a space in the name succeed.zisilon onefs)Ú	plat_nameN)r†   r>   rX   )rb   r�   r<   r<   r=   Útest_platform_with_space  s   
r  c           
   	   C  sÄ   |   |¡ dddddœ}| ¡ D ]"\}}t|ddd��}| t|ƒ¡ W d  ƒ n1 s-w   Y  qtƒ  ¡  d	}tj 	|¡sBJ ‚t
t|ƒ ¡ ƒ}d
D ]}||v sTJ ‚qLdD ]}	|	|vs_J ‚qWdS )zþ
    Setuptools allow authors to set PEP 440's local version segments
    using ``egg_info.tag_build``. This should be reflected not only in the
    ``.whl`` file name, but also in the ``.dist-info`` and ``.data`` dirs.
    See pypa/setuptools#3997.
    z]
            from setuptools import setup
            setup(headers=["hello.h"])
            zê
            [metadata]
            name = test
            version = 1.0

            [options.data_files]
            hello/world = file.txt

            [egg_info]
            tag_build = +what
            tag_date = 0
            r   )r   r&   zfile.txtzhello.hÚwru   rv   Nz#dist/test-1.0+what-py3-none-any.whl)z"test-1.0+what.data/headers/hello.hz,test-1.0+what.data/data/hello/world/file.txtz test-1.0+what.dist-info/METADATAztest-1.0+what.dist-info/WHEEL)ztest.data/headers/hello.hz'test-1.0.data/data/hello/world/file.txtztest.dist-info/METADATAztest-1.0.dist-info/WHEEL)r†   r4   ÚopenÚwriter   r>   rX   r0   r1   r2   r›   r   rœ   )
r�   rŽ   rÏ   ÚfileÚcontentÚfhÚ
wheel_pathÚentriesÚexpectedÚnot_expectedr<   r<   r=   Útest_data_dir_with_tag_build#  s(   
îÿ€
úr  )Úreportedr  )zlinux-x86_64Ú
linux_i686)zlinux-aarch64Úlinux_armv7lÚLinuxz!Only makes sense to test on Linux)Úreasonc                 C  sL   |  tddd„ ¡ t ¡ }t|ƒ}| |_d|_| ¡ \}}}||ks$J ‚d S )NÚcalcsizec                 S  rç   )Né   r<   rì   r<   r<   r=   ré   b  rê   z'test_platform_linux32.<locals>.<lambda>F)r5   ÚstructÚ
setuptoolsr	   r   r  Úroot_is_pureÚget_tag)r  r  r�   rL   r9   Ú_Úactualr<   r<   r=   Útest_platform_linux32Z  s   r   rx   ry   c                 C  sž   ddd„}t tƒ� |  tjd¡ W d   ƒ n1 sw   Y  |  td|¡ tjt	dd�� d	d l
}W d   ƒ n1 s=w   Y  |  tjd
¡ d	d l}d S )NrG   rE   c                 _  s.   | dkrt d| › �ƒ‚tj| g|¢R i |¤ŽS )NÚctypeszNo module named )ÚModuleNotFoundErrorÚ	importlibÚ
__import__)rG   Úargsr7   r<   r<   r=   Ú_fake_importl  s   z$test_no_ctypes.<locals>._fake_importzwheel.macosx_libfiler$  zNo module named ctypesrº   r   zsetuptools.command.bdist_wheel)rG   rE   )r   ÚKeyErrorÚdelitemrô   Úmodulesr5   Úbuiltinsr½   Úraisesr"  Úwheel.macosx_libfileÚsetuptools.command.bdist_wheel)r�   r&  Úwheelr  r<   r<   r=   Útest_no_ctypesk  s   

ÿ
ÿr/  c                 C  sº   |  | ¡ |d }| ¡  |d jddd� |d jddd� tt|ƒt|ƒd� ¡  d	d
h}tdƒ�}t| ¡ ƒ}W d   ƒ n1 sDw   Y  || tƒ ksRJ ‚dd„ |D ƒr[J ‚d S )Nrt   r…   zname: helloworldru   rv   ÚFOOÚbar)rN   Údist_info_dirzdummy_dist-1.0.dist-info/FOOr   r•   c                 S  s   g | ]
}d t |ƒv r|‘qS )zegg-inforQ   rg   r<   r<   r=   Ú
<listcomp>—  s    z+test_dist_info_provided.<locals>.<listcomp>)	r†   r‡   rˆ   r>   rE   rX   r   r›   rœ   )rb   r�   rŽ   r�   r  rŸ   Úfiles_foundr<   r<   r=   Útest_dist_info_provided�  s   
þ
ÿr5  c                 C  sð   ddt dƒt dƒddœdœ}tjj|t|ƒd� |  |d	 ¡ d
}tjt|d�� t	ƒ  
¡  W d   ƒ n1 s8w   Y  tdƒ�-}t| ¡ ƒ}ddh}||ksRJ ‚| d¡ d¡}d|v s`J ‚d|v sfJ ‚W d   ƒ d S 1 sqw   Y  d S )Nzparent licensezparent noticezó
                [project]
                name = "test-proj"
                dynamic = ["version"]      # <---- testing dynamic will not break
                [tool.setuptools.dynamic]
                version.file = "VERSION"
                z�
                [metadata]
                license_files =
                  ../LICENSE.txt
                  ../NOTICE.txt
                Ú42)zpyproject.tomlr&   ÚVERSION)r   z
NOTICE.txtÚpythonr?   r8  z'Pattern '../.*.txt' cannot contain '..'rº   z"dist/test_proj-42-py3-none-any.whlz+test_proj-42.dist-info/licenses/LICENSE.txtz*test_proj-42.dist-info/licenses/NOTICE.txtztest_proj-42.dist-info/METADATAr©   zLicense-File: LICENSE.txtzLicense-File: NOTICE.txt)r   rB   r1   rC   rE   r†   r½   r¾   r
   r>   rX   r   r›   rœ   ro   r«   )r�   rŽ   rÏ   ÚmsgrŸ   r4  Úexpected_filesr’   r<   r<   r=   Ú0test_allow_grace_period_parent_directory_licenseš  s6   ÿ	ÿîýÿ
þ"ör;  r~   )TÚ
__future__r   r*  r#  Úos.pathr0   ÚplatformrÆ   rË   r  rô   ró   Ú
contextlibr   Úinspectr   Úzipfiler   Újaraco.pathrB   r½   Ú	packagingr   r  r-  r   r   Úsetuptools.distr	   Úsetuptools.warningsr
   Údistutils.corer   r�   rš   ÚOTHER_IGNORED_FILESÚSETUPPY_EXAMPLEÚdictÚfromkeysrD   r>   rI   Úfixturer^   rb   rd   rm   rs   r‰   r“   r¡   r¤   ÚmarkÚparametrizer¯   r¬   r³   r´   r¹   r¿   rÂ   rÁ   ÚfilterwarningsrÄ   rÐ   ÚlistÚsupported_compressionsr4   r×   rÞ   rå   r÷   rü   r   r  r  r  r  ÚskipifÚsystemr   r/  r5  r;  r<   r<   r<   r=   Ú<module>   s$   þþýÿóÿæÿòÿþÿíÿòÿ	öÿÿöŒ 
ÿ
î



ÿþýþ

		ÿ
ý
	7þÿ

