U
    aÊ¹j°Ð  ã                   @   sÐ  d 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
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mZ ddlZddlm  mZ ddlmZmZm Z  ddl!m"Z" dd	l#m$Z$ dd
lm%Z% ddl&mZ ddl'm(Z( ddl)m*Z* ddl+m,Z,m-Z- ddl.m/Z/ ddl0m1Z1 ddl2Z3ej4dd�dd„ ƒZ5G dd„ dƒZ6e1dƒZ7G dd„ dƒZ8ej9 :d¡G dd„ dƒƒZ;ej4dd„ ƒZ<ej9 =d ¡ej9 =d¡G d!d"„ d"ƒƒƒZ>ej4d#d$„ ƒZ?ej4d%d&„ ƒZ@G d'd(„ d(ƒZAG d)d*„ d*ƒZBG d+d,„ d,ƒZCd-d.„ ZDd/d0„ ZEd1d2„ ZFd3d4„ ZGd5d6eDddd7fd8d9„ZHej9jIe
jJ Kd:¡�oze Le
jM¡d;d<�G d=d>„ d>ƒƒZNG d?d@„ d@ƒZOG dAdB„ dBƒZPG dCdD„ dDeƒZQdEdF„ ZRdGdH„ ZSdS )IzEasy install Testsé    N)ÚPath)Ú
NamedTuple)Úmock©Úpath)ÚDistributionÚnormalize_pathÚworking_set)Úsandbox)Ú
safer_name)ÚPthDistributions)r   ©Ú	run_setup)Úfail_on_ascii)Ú
MockServerÚpath_to_urlé   )Úcontexts)ÚDALST)Zautousec                 C   s   |   dd¡ dS )zŸ
    Important: Disable the default index for pip to avoid
    querying packages in the index and potentially resolving
    and installing packages there.
    ÚPIP_NO_INDEXÚtrueN)Úsetenv)Úmonkeypatch© r   úa/var/www/html/bwave/python/venv/lib/python3.8/site-packages/setuptools/tests/test_easy_install.pyÚpip_disable_index*   s    r   c                   @   s   e Zd Zdd„ Zdd„ ZdS )ÚFakeDistc                 C   s   |dkri S ddiS )NÚconsole_scriptsÚnameÚepr   )ÚselfÚgroupr   r   r   Úget_entry_map5   s    zFakeDist.get_entry_mapc                 C   s   dS )NÚspecr   ©r    r   r   r   Úas_requirement:   s    zFakeDist.as_requirementN)Ú__name__Ú
__module__Ú__qualname__r"   r%   r   r   r   r   r   4   s   r   z3
    from setuptools import setup

    setup()
    c                   @   s˜   e Zd Zdd„ Zdd„ Zdd„ Zdd„ Zd	d
„ Zej	dd„ ƒZ
edd„ ƒZej	dd„ ƒZedd„ ƒZej	dd„ ƒZejjej d¡ dd�dd„ ƒZdS )ÚTestEasyInstallTestc                 C   s„   t j ¡  ¡  ¡ }tƒ }tt j |¡ƒ}t	 
|d¡\}}| |¡sFt‚d|ksRt‚d|ks^t‚d|ksjt‚tjd|tjd�s€t‚d S )Né   z'spec'z'console_scripts'z'name'z^# EASY-INSTALL-ENTRY-SCRIPT)Úflags)ÚeiÚCommandSpecÚbestÚfrom_environmentÚ	as_headerr   ÚnextÚScriptWriterÚget_argsÚ	itertoolsÚisliceÚ
startswithÚAssertionErrorÚreÚsearchÚ	MULTILINE)r    ÚheaderÚdistÚargsr   Úscriptr   r   r   Útest_get_script_argsH   s    z(TestEasyInstallTest.test_get_script_argsc                 C   sÄ   t ƒ }t |¡}dd„ |_d|_ddg|_tj t	 
¡ d¡|_dg|_| ¡  |jji ks^t‚t |¡}dd„ |_ddg|_tj t	 
¡ d¡|_dg|_| ¡  t|jj ¡ ƒ}|ddgksÀt‚d S )Nc                   S   s   dS ©NTr   r   r   r   r   Ú<lambda>X   ó    z8TestEasyInstallTest.test_no_find_links.<locals>.<lambda>TÚlink1Úlink2Úokc                   S   s   dS r@   r   r   r   r   r   rA   b   rB   )r   r,   Úeasy_installZcheck_pth_processingZno_find_linksÚ
find_linksÚosr   ÚjoinÚtempfileÚmkdtempÚinstall_dirr=   Úensure_finalizedZpackage_indexZscanned_urlsr7   ÚsortedÚkeys)r    r<   ÚcmdrO   r   r   r   Útest_no_find_linksS   s"    





z&TestEasyInstallTest.test_no_find_linksc              	   C   s@   t ƒ }t |¡}t ¡ |_t tj	j
¡� | ¡  W 5 Q R X dS )zS
        Test that `cant_write_to_target` is rendered as a DistutilsError.
        N)r   r,   rF   rH   ÚgetcwdrL   ÚpytestÚraisesÚ	distutilsÚerrorsÚDistutilsErrorZcant_write_to_target)r    r<   rP   r   r   r   Útest_write_exceptionj   s
    

z(TestEasyInstallTest.test_write_exceptionc                    s:   t dƒ‰ ‡ fdd„}|jtd|dd� ˆ t ¡ ks6t‚dS )zh
        get_site_dirs should always return site dirs reported by
        site.getsitepackages.
        z/setuptools/test/site-packagesc                      s   ˆ gS ©Nr   r   r   r   r   Úmock_gsp{   s    z8TestEasyInstallTest.test_all_site_dirs.<locals>.mock_gspÚgetsitepackagesF©ZraisingN)r   ÚsetattrÚsiter,   Úget_site_dirsr7   )r    r   rZ   r   r   r   Útest_all_site_dirst   s    z&TestEasyInstallTest.test_all_site_dirsc                 C   s    |j tddd� t ¡ st‚d S )Nr[   Fr\   )Údelattrr^   r,   r_   r7   )r    r   r   r   r   Ú0test_all_site_dirs_works_without_getsitepackages�   s    zDTestEasyInstallTest.test_all_site_dirs_works_without_getsitepackagesc                 C   sX   dt dƒfddg}d}|| }t t|ƒd¡}|D ]\}}| ||¡ q2| ¡  t|ƒS )Núsetup.pya5  
                    import setuptools
                    setuptools.setup(
                        name="setuptools-test-unicode",
                        version="1.0",
                        packages=["mypkg"],
                        include_package_data=True,
                    )
                    ©zmypkg/__init__.pyÚ )u   mypkg/â˜ƒ.txtre   zsetuptools-test-unicode-1.0.zipÚw)r   ÚzipfileÚZipFileÚstrÚwritestrÚclose©r    ÚtmpdirÚfilesÚ
sdist_nameÚsdistZ	sdist_zipÚfilenameÚcontentr   r   r   Úsdist_unicode…   s    ÿþíz!TestEasyInstallTest.sdist_unicodec                 C   sZ   t ddgiƒ}|d  ¡ }tj|t|ƒdgd�}| tjdt|ƒ¡ | ¡  | |¡ dS )zq
        The install command should execute correctly even if
        the package has unicode filenames.
        Úscript_argsrF   ÚtargetÚx©rL   r=   Ú
PYTHONPATHN©	r   Ú
ensure_dirr,   rF   ri   ÚsetitemrH   ÚenvironrM   )r    rs   rm   r   r<   ru   rP   r   r   r   Útest_unicode_filename_in_sdist©   s    ýz2TestEasyInstallTest.test_unicode_filename_in_sdistc                 C   sf   dt dƒfddt dƒfg}d}|| }t t|ƒd¡}|D ]\}}| || d¡¡ q:| ¡  t|ƒS )	Nrc   ar  
                    import setuptools
                    setuptools.setup(
                        name="setuptools-test-unicode",
                        version="1.0",
                        packages=["mypkg"],
                        include_package_data=True,
                        scripts=['mypkg/unicode_in_script'],
                    )
                    rd   zmypkg/unicode_in_scriptu…   
                    #!/bin/sh
                    # Ã¡

                    non_python_fn() {
                    }
                z&setuptools-test-unicode-script-1.0.ziprf   úutf-8)r   rg   rh   ri   rj   Úencoderk   rl   r   r   r   Úsdist_unicode_in_scriptº   s&    ÿþÿþïz+TestEasyInstallTest.sdist_unicode_in_scriptc                 C   sZ   t ddgiƒ}|d  ¡ }tj|t|ƒdgd�}| tjdt|ƒ¡ | ¡  | |¡ dS )zr
        The install command should execute correctly even if
        the package has unicode in scripts.
        rt   rF   ru   rv   rw   rx   Nry   )r    r€   rm   r   r<   ru   rP   r   r   r   Útest_unicode_content_in_sdistä   s    z1TestEasyInstallTest.test_unicode_content_in_sdistc                 C   s6   dt dƒfdt dƒfg}d}t|| ƒ}t||ƒ |S )Nrc   a  
                    import setuptools
                    setuptools.setup(
                        name="setuptools-test-script",
                        version="1.0",
                        scripts=["mypkg_script"],
                    )
                    Úmypkg_scriptzg
                     #/usr/bin/python
                     print('mypkg_script')
                     zsetuptools-test-script-1.0.zip)r   ri   Ú
make_sdist)r    rm   rn   ro   rp   r   r   r   Úsdist_scriptó   s    ÿþÿþò
z TestEasyInstallTest.sdist_scriptÚlinuxzTest can only be run on Linux©Úreasonc                 C   sj   t ddgiƒ}|d  ¡ }tj|t|ƒdgd�}| tjdt|ƒ¡ | ¡  | |¡ |d  	¡ sft
‚dS )	z.
        Check scripts are installed.
        rt   rF   ru   rv   rw   rx   r‚   N)r   rz   r,   rF   ri   r{   rH   r|   rM   Úexistsr7   )r    r„   rm   r   r<   ru   rP   r   r   r   Útest_script_install  s    ý
z'TestEasyInstallTest.test_script_installN)r&   r'   r(   r?   rQ   rX   r`   rb   rS   Úfixturers   r   r}   r€   r�   r„   ÚmarkÚskipifÚsysÚplatformr6   r‰   r   r   r   r   r)   G   s(   

#

)

 ÿr)   zignore:Unbuilt eggc                   @   s$   e Zd Zdd„ Zdd„ Zdd„ ZdS )ÚTestPTHFileWriterc                 C   s:   t dt ¡ gƒ}|jrt‚| tt ¡ ƒ¡ |js6t‚dS )zba pth file manager should set dirty
        if a distribution is in site but also the cwd
        údoes-not_existN)r   rH   rR   Údirtyr7   ÚaddÚPRDistribution)r    Úpthr   r   r   Ú!test_add_from_cwd_site_sets_dirty(  s    
z3TestPTHFileWriter.test_add_from_cwd_site_sets_dirtyc                 C   s@   d}t  |¡}td|gƒ}|jr$t‚| t|ƒ¡ |jr<t‚d S )Nz%/test/location/does-not-have-to-existr�   )Úpkg_resourcesr   r   r‘   r7   r’   r“   )r    Úlocationr”   r   r   r   Útest_add_from_site_is_ignored1  s    
ÿþ
z/TestPTHFileWriter.test_add_from_site_is_ignoredc                 C   sì   |  d¡}| ¡  t|  d¡ƒ}t|ƒ}t|ƒ}|j|j  krHg ksRn tdƒ‚|  d¡}| ¡  t|ƒ}|j |¡ | ¡  |jsŽtdƒ‚||jks tdƒ‚| ¡  ||jksºtdƒ‚|jd |ksÐtd	ƒ‚t|ƒj|jksètd
ƒ‚dS )z«
        If the pth file is modified under the hood, then PthDistribution
        will refresh its content before saving, merging contents when
        necessary.
        Ú
pth_subdirz	file1.pthz6unless there would be some default added at some pointZ
src_subdirzEthe new_src_path added must still be present/valid in pth1 after savez:right before we save the entry should still not be presentzJthe new_src_path entry should have been added by pth2 with its save() calléÿÿÿÿzVand it should match exactly on the last entry actually given we append to it in save()zXand we should have the exact same list at the end with a fresh PthDistributions instanceN)rI   Úmkdirri   r   Úpathsr7   ÚappendÚsave)r    rm   r™   Zpth_pathZpth1Zpth2Znew_src_pathZnew_src_path_strr   r   r   Ú*test_many_pth_distributions_merge_together?  s:    
ÿ
ÿÿÿÿÿz<TestPTHFileWriter.test_many_pth_distributions_merge_togetherN)r&   r'   r(   r•   r˜   rŸ   r   r   r   r   r�   &  s   	r�   c              	   c   sF   | d j ddd��}| t¡ W 5 Q R X |  ¡ � | V  W 5 Q R X d S )Nrc   rf   r~   ©Úencoding)ÚopenÚwriteÚSETUP_PYZas_cwd)rm   Úfr   r   r   Úsetup_contextk  s    
r¦   Zuser_overridec                   @   s¬   e Zd Ze de ¡ ¡Ze dej¡e dd¡edd„ ƒƒƒZ	e dd¡edd	„ ƒƒZ
ed
d„ ƒZdd„ Ze ¡ dd„ ƒZe ¡ dd„ ƒZdd„ Zejdd„ ƒZdd„ ZdS )ÚTestUserInstallTestz;setuptools.command.easy_install.easy_install.check_site_dirz(setuptools.command.easy_install.__file__úsite.ENABLE_USER_SITETc                 C   s   |   ¡  d S rY   ©Úassert_not_user_siter$   r   r   r   Ú/test_user_install_not_implied_user_site_enabled  s    zCTestUserInstallTest.test_user_install_not_implied_user_site_enabledFc                 C   s   |   ¡  d S rY   r©   r$   r   r   r   Ú0test_user_install_not_implied_user_site_disabled…  s    zDTestUserInstallTest.test_user_install_not_implied_user_site_disabledc                  C   s8   t ƒ } d| _t | ¡}dg|_| ¡  |jr4tdƒ‚d S )Nrc   Úpyzuser should not be implied)r   Úscript_namer,   rF   r=   rM   Úuserr7   )r<   rP   r   r   r   rª   Š  s    
z(TestUserInstallTest.assert_not_user_sitec                 C   s4   t  d¡ t d¡}tjtjtjd� | d¡ d S )NÚmultiprocessingZtest_easy_install)ÚlevelÚstreamzthis should not break)	rS   ZimportorskipÚloggingÚ	getLoggerÚbasicConfigÚINFOr�   ÚstderrÚinfo)r    Úlogr   r   r   Útest_multiproc_atexit”  s    

z)TestUserInstallTest.test_multiproc_atexitc              	   C   s0   |d }|  d¡�}| d¡ W 5 Q R X t|ƒS )Nzfoo-1.0.egg-inforf   z
Name: foo
)r¢   r£   ri   )r    rm   Zegg_filer¥   r   r   r   Úfoo_package›  s    zTestUserInstallTest.foo_packagec              
   c   s`   t |ƒ}t dtj|g ¡�: tjj tj¡}tjjtj	|d�� |V  W 5 Q R X W 5 Q R X d S )Nzsys.path©rx   )
ri   r   Úpatchr�   r   rH   ÚpathseprI   Údictr|   )r    rm   ru   Zpython_pathr   r   r   Úinstall_target¢  s
    z"TestUserInstallTest.install_targetc                 C   s~   t ƒ }d|_t |¡}||_dg|_| ¡  |j |g¡ | d¡}t	j
 t	j
 |j¡¡}t	j
 t	j
 |¡¡}||kszt‚dS )zd
        The local index must be used when easy_install locates installed
        packages.
        rc   ZfooN)r   r®   r,   rF   rL   r=   rM   Zlocal_indexÚscanrH   r   ÚnormcaseÚrealpathr—   r7   )r    r»   rÀ   r<   rP   ÚresÚactualÚexpectedr   r   r   Útest_local_indexª  s    

z$TestUserInstallTest.test_local_indexc              	   o   s<   | j ||Ž�& ddlm  m} tj|_dV  W 5 Q R X dS )zw
        Wrap sandbox.setup_context to patch easy_install in that context to
        appear as user-installed.
        r   N)Úorig_contextÚsetuptools.command.easy_installÚcommandrF   r^   Ú	USER_SITEÚ__file__)r    r=   Úkwargsr,   r   r   r   Úuser_install_setup_context»  s    z.TestUserInstallTest.user_install_setup_contextc                 C   s   t j| _t d| j¡S )Nz setuptools.sandbox.setup_context)r
   r¦   rÈ   r   r½   rÎ   r$   r   r   r   Úpatched_setup_contextÇ  s
    þz)TestUserInstallTest.patched_setup_contextN)r&   r'   r(   r   r½   ÚMockZprev_sp_writer^   rË   r«   r¬   Ústaticmethodrª   rº   rS   rŠ   r»   rÀ   rÇ   Ú
contextlibÚcontextmanagerrÎ   rÏ   r   r   r   r   r§   s  s,   þ


	


r§   c               
   c   sT   t  dd¡} tjtjd��0 tdddd��}| | ¡ W 5 Q R X d V  W 5 Q R X d S )Nzfrom setuptools import setupz from distutils.core import setup)Úcdrc   rf   r~   r    )r¤   Úreplacer   ÚtempdirrH   Úchdirr¢   r£   )Zdistutils_setup_pyr¥   r   r   r   Údistutils_packageÐ  s    þrØ   c                  C   s&   t ƒ } | jdkrt d¡ |  ¡  | S )Nr   zcould not find a valid port)r   Zserver_portrS   ÚskipÚstart)Zp_indexr   r   r   Ú
mock_indexÜ  s
    

rÛ   c                   @   s   e Zd Zdd„ ZdS )ÚTestDistutilsPackagec                 C   s   t ddgƒ d S )Nrc   Z	bdist_eggr   )r    rØ   r   r   r   Ú)test_bdist_egg_available_on_distutils_pkgé  s    z>TestDistutilsPackage.test_bdist_egg_available_on_distutils_pkgN)r&   r'   r(   rÝ   r   r   r   r   rÜ   è  s   rÜ   c                   @   s   e Zd Zdd„ Zdd„ ZdS )ÚTestInstallRequiresc                 C   s0  |d }|j dd� |d }|j dd� |  |¡ tjddddt|ƒdt|ƒd	t|ƒd
t|ƒdt|ƒdt|ƒdt|ƒg}tjd|ji–}tj	|t|ƒ|tj
tjddd�}|jdks¶t‚z8ddd„ |jD ƒksÐt‚tdd„ |j ¡ D ƒƒsìt‚W n< tk
�r*   d|jk�r$t tj› d|j› �¡ ‚ Y nX dS )z~
        When ``python setup.py install`` is called directly, it will use easy_install
        to fetch dependencies.
        ÚprojectT)Úexist_okÚinstallú-cú __import__("setuptools").setup()z--install-basez--install-libz--install-headersz--install-scriptsz--install-dataz--install-purelibz--install-platlibZ__EASYINSTALL_INDEXr~   )ÚcwdÚenvÚstdoutr·   Útextr¡   r   ú/does-not-exist/c                 S   s   h | ]
}|j ’qS r   r   ©Ú.0Úrr   r   r   Ú	<setcomp>  s     zOTestInstallRequires.test_setup_install_includes_dependencies.<locals>.<setcomp>c                 s   s"   | ]}d |krd|kr|V  qdS )z"not find suitable distribution forzdoes-not-existNr   )rê   Úliner   r   r   Ú	<genexpr>  s   ýzOTestInstallRequires.test_setup_install_includes_dependencies.<locals>.<genexpr>zfailed to get random numbersz failure - N)r›   Úcreate_projectr�   Ú
executableri   rH   r|   ÚurlÚ
subprocessÚrunÚPIPEÚSTDOUTÚ
returncoder7   Úrequestsr1   ræ   Ú
splitlinesÚ	ExceptionrS   ZxfailrŽ   )r    Útmp_pathrÛ   Zproject_rootZinstall_rootrP   rå   Úcpr   r   r   Ú(test_setup_install_includes_dependenciesî  sX    
îù	þz<TestInstallRequires.test_setup_install_includes_dependenciesc                 C   s*   d}|d j t|ƒdd� |d  ¡  d S )Nzž
        [metadata]
        name = project
        version = 42

        [options]
        install_requires = does-not-exist
        py_modules = mod
        ú	setup.cfgr~   r    zmod.py)Ú
write_textr   Útouch)r    ÚrootÚconfigr   r   r   rï   &  s    	z"TestInstallRequires.create_projectN)r&   r'   r(   rü   rï   r   r   r   r   rÞ   í  s   8rÞ   c                   @   s²   e Zd Zdd„ Zeejdd„ ƒƒZdZe	j
 de¡dd„ ƒZe	j
 de¡d	d
„ ƒZe	j
 de¡dd„ ƒZdd„ Zdd„ Zdd„ Zdd„ Ze	j
 dd¡dd„ ƒZdd„ Zdd„ ZdS )ÚTestSetupRequiresc                 C   sÀ   |  dd¡ |  dd¡ |  dd¡ t ¡ �p t ¡ �\}t ¡ �H}tj|d��0 tjddd	d
|j	dd||g
}t
 |¡ ¡  W 5 Q R X W 5 Q R X W 5 Q R X W 5 Q R X dd„ |jD ƒdgks¼t‚dS )z¼
        When easy_install installs a source distribution which specifies
        setup_requires, it should honor the fetch parameters (such as
        index-url, and find-links).
        ÚPIP_RETRIESÚ0ÚPIP_TIMEOUTr   Úfalser¼   râ   rã   rF   z--index-urlz--exclude-scriptsz--install-dirc                 S   s   g | ]
}|j ‘qS r   r   ré   r   r   r   Ú
<listcomp>Q  s     zMTestSetupRequires.test_setup_requires_honors_fetch_params.<locals>.<listcomp>rè   N)r   r   Úquietr  Úcreate_sdistrÖ   Úenvironmentr�   rð   rñ   rò   ÚPopenÚwaitr÷   r7   )r    rÛ   r   Z	dist_fileZtemp_install_dirrP   r   r   r   Ú'test_setup_requires_honors_fetch_params5  s(    


ö6z9TestSetupRequires.test_setup_requires_honors_fetch_paramsc               	   c   sB   t  ¡ �0} tj | d¡}t|dtdƒfdgƒ |V  W 5 Q R X dS )zl
        Return an sdist with a setup_requires dependency (of something that
        doesn't exist)
        z"setuptools-test-fetcher-1.0.tar.gzrc   a  
                    import setuptools
                    setuptools.setup(
                        name="setuptools-test-fetcher",
                        version="1.0",
                        setup_requires = ['does-not-exist'],
                    )
                ©rý   re   N)r   rÖ   rH   r   rI   rƒ   r   )ÚdirÚ	dist_pathr   r   r   r	  S  s    
ÿþòþzTestSetupRequires.create_sdist)r   ©Údependency_links©Úsetup_requires)r  r  Úuse_setup_cfgc           	      C   s®   t dddd�}t |¡ t ¡ �„ t ¡ �p}t||d�}tj 	|d¡}t 
¡ �\}}t|dgƒ W 5 Q R X | ¡ }t|ƒdks‚t‚|d	  ¡ d
ks–t‚W 5 Q R X W 5 Q R X dS )a<  
        Regression test for distribution issue 323:
        https://bitbucket.org/tarek/distribute/issues/323

        Ensures that a distribution's setup_requires requirements can still be
        installed and used locally even if a conflicting version of that
        requirement is already on the path.
        zdoes-not-matterÚfoobarú0.0©Úproject_nameÚversion©r  rc   ú--namer   rš   Útest_pkgN)r“   r	   r’   r   Úsave_pkg_resources_staterÖ   Úcreate_setup_requires_packagerH   r   rI   r  r   Ú	readlinesÚlenr7   Ústrip)	r    r  Z	fake_distÚtemp_dirr  Útest_setup_pyræ   r·   Úlinesr   r   r   Ú.test_setup_requires_overrides_version_conflictx  s$      ÿ


 ÿz@TestSetupRequires.test_setup_requires_overrides_version_conflictc                 C   sj  t  ¡ ��V t  ¡ ��@}tj |d¡}t|ddƒ tj |d¡}t |¡ t 	|¡�}dd„ |_
| |¡ W 5 Q R X tj d|¡ t|ddd�}t |¡ td	ƒ}t|dd
t||d�}tj |d¡}	t  ¡ �>\}
}zt|	dgƒ W n" tjk
�r   t d¡ Y nX W 5 Q R X d|
 ¡ k�s"t‚|
 ¡ }t|ƒdk�s<t‚|d  ¡ dk�sRt‚W 5 Q R X W 5 Q R X dS )zÃ
        Like ``test_setup_requires_overrides_version_conflict`` but where the
        ``setup_requires`` package is part of a namespace package that has
        *already* been imported.
        zfoo_bar-0.1.tar.gzzfoo.barú0.1zfoo_bar-0.1c                 S   s   | S rY   r   )Úmemberr   r   r   r   rA   ¨  rB   zFTestSetupRequires.test_setup_requires_override_nspkg.<locals>.<lambda>r   r  aæ                      import foo  # Even with foo imported first the
                                # setup_requires package should override
                    import setuptools
                    setuptools.setup(**%r)

                    if not (hasattr(foo, '__path__') and
                            len(foo.__path__) == 2):
                        print('FAIL')

                    if 'foo_bar-0.2' not in foo.__path__[0]:
                        print('FAIL')
                z0.2r  rc   r  z9Installing setup.py requirements caused a VersionConflictZFAILr   rš   r  N)r   r  rÖ   rH   r   rI   Úmake_nspkg_sdistr›   Útarfiler¢   Úextraction_filterÚ
extractallr�   Úinsertr“   r	   r’   r   r  r  r   r–   ÚVersionConflictrS   ZfailÚgetvaluer7   r   r!  r"  )r    r  r#  Zfoobar_1_archiveZfoobar_1_dirÚtfr<   Útemplater  r$  ræ   r·   r%  r   r   r   Ú"test_setup_requires_override_nspkg—  sN    

  ÿ
ÿú	ÿz4TestSetupRequires.test_setup_requires_override_nspkgc           	      C   s¬   dd„ }t  ¡ �’ t  ¡ �~}t|tdd�||d d�}tj |d¡}t  ¡ �\}}t	|dgƒ W 5 Q R X | 
¡ }t|ƒdks€t‚|d	  ¡ d
ks”t‚W 5 Q R X W 5 Q R X d S )Nc                 S   s4   dt dj||d�ƒf|d t dƒfg}t| |ƒ d S )Nrc   zú
                    import setuptools
                    setuptools.setup(
                        name={name!r},
                        version={version!r},
                        py_modules=[{name!r}],
                    )
                    )r   r  z.pyz6
                    version = 42
                    )r   Úformatrƒ   )r  Údistnamer  rn   r   r   r   Úmake_dependency_sdistÝ  s     ùÿþÿþòzVTestSetupRequires.test_setup_requires_with_attr_version.<locals>.make_dependency_sdistzattr: foobar.version)r  )Úsetup_attrsÚmake_packager  rc   ú	--versionr   rš   Ú42)r   r  rÖ   r  r¿   rH   r   rI   r  r   r   r!  r7   r"  )	r    r  r5  r#  r  r$  ræ   r·   r%  r   r   r   Ú%test_setup_requires_with_attr_versionÛ  s    

üz7TestSetupRequires.test_setup_requires_with_attr_versionc                 C   s  |  dd¡ |  dd¡ |  dd¡ |  d|j¡ t ¡ �š t ¡ �†}t|ddtg d	�d
�}tj 	|d¡}t
|ddd��}| tdƒ¡ W 5 Q R X tj 	|d¡}t tjj¡� t|dgƒ W 5 Q R X W 5 Q R X W 5 Q R X t|jƒdksìt‚|jd jdk�st‚d S )Nr  r  r  r   r  ÚPIP_INDEX_URLúpython-xlibú0.19r  ©r6  rý   rf   r~   r    z}
                        [easy_install]
                        index_url = https://pypi.org/legacy/
                        rc   r8  r   r   z/python-xlib/)r   rñ   r   r  rÖ   r  r¿   rH   r   rI   r¢   r£   r   rS   rT   rU   rV   rW   r   r!  r÷   r7   )r    rÛ   r   r#  r  Útest_setup_cfgÚfpr$  r   r   r   Ú"test_setup_requires_honors_pip_env  s0    

üÿÿ*z4TestSetupRequires.test_setup_requires_honors_pip_envc              
   C   s¾   |  dd¡ |  dd¡ |  d|j¡ t ¡ �t t ¡ �`}tj |d¡}t|ddƒ t	|dd	�}t
|d
dtd| d�d�}tj |d¡}t|dgƒ W 5 Q R X W 5 Q R X t|jƒdksºt‚d S )Nr  r  r  r;  z
dep.tar.gzÚ
dependencyr9  Ú	localhost)Ú	authorityr<  r=  zdependency @ %sr  r>  rc   r8  r   )r   rñ   r   r  rÖ   rH   r   rI   Úmake_trivial_sdistr   r  r¿   r   r!  r÷   r7   )r    rÛ   r   r#  Z	dep_sdistZdep_urlr  r$  r   r   r   Ú#test_setup_requires_with_pep508_url#  s"    

û z5TestSetupRequires.test_setup_requires_with_pep508_urlc                 C   sš   dt dƒt dƒdœi}t ¡ �` t ¡ �L}tj||d� tt |dd¡ƒ}t	 
tjj¡� t|dgƒ W 5 Q R X W 5 Q R X W 5 Q R X t|jƒdks–t‚d	S )
z2The `allow-hosts` option in not supported anymore.r  z~
                    from setuptools import setup
                    setup(setup_requires='python-xlib')
                    z\
                    [easy_install]
                    allow_hosts = *
                    ©rc   rý   ©Úprefixrc   r8  r   N)r   r   r  rÖ   r   Úbuildri   Úpathlibr   rS   rT   rU   rV   rW   r   r!  r÷   r7   )r    rÛ   rn   r#  Úsetup_pyr   r   r   Ú$test_setup_requires_with_allow_hosts7  s     ÿÿùÿ

*z6TestSetupRequires.test_setup_requires_with_allow_hostsc              
   C   s^  |  dd¡ |  dd¡ |  dd¡ |  dd¡ d}tt|| ƒƒ}d}tt|| ƒd	d
|ƒ d}tt|| ƒƒ}dd tttjdd… ƒ¡ d }tt|| ƒd	d|ƒ |d }	|	 t	dƒj
||||||d�d¡ tt|	ƒƒ}
t ¡ �> tt|ƒddtd	|
gd�d�}tj |d¡}t|dgƒ W 5 Q R X tttt tj |d¡¡ƒƒ}|dgk�sZt‚dS )z#Check `python_requires` is honored.r  r  r  r   Ú1ZPIP_VERBOSEzdep-1.0.tar.gzz>=2.7Údepú1.0zdep-2.0.tar.gzz!=Ú.Nr*   z.*z2.0z
index.htmla©  
            <!DOCTYPE html>
            <html><head><title>Links for dep</title></head>
            <body>
                <h1>Links for dep</h1>
                <a href="{dep_1_0_url}"data-requires-python="{dep_1_0_python_requires}">{dep_1_0_sdist}</a><br/>
                <a href="{dep_2_0_url}"data-requires-python="{dep_2_0_python_requires}">{dep_2_0_sdist}</a><br/>
            </body>
            </html>
            )Údep_1_0_urlÚdep_1_0_sdistÚdep_1_0_python_requiresÚdep_2_0_urlÚdep_2_0_sdistÚdep_2_0_python_requiresr~   r<  r=  )r  r  r>  rc   r8  z.eggszdep 1.0)r   r   ri   Úmake_python_requires_sdistrI   Úmapr�   Úversion_inforþ   r   r3  r   r  r  r¿   rH   r   r   Úlistr–   Úfind_distributionsr7   )r    r   rm   rS  rR  rT  rV  rU  rW  ÚindexÚ	index_urlr  r$  Úeggsr   r   r   Ú(test_setup_requires_with_python_requiresQ  sd    
   ÿ"
   ÿÿíê
üÿz:TestSetupRequires.test_setup_requires_with_python_requiresÚ!with_dependency_links_in_setup_py)FTc           	      C   s   |  dd¡ |  dd¡ t ¡ �ö t ¡ �â}ttj |d¡ddƒ tj |d¡}tj |d¡}tj |d	¡}t |¡ t	|d
dd��6}|rœtj |d¡g}ng }| 
tdƒj|d�¡ W 5 Q R X t	|d
dd��(}| 
tdƒjtj |d¡|d�¡ W 5 Q R X t|dgƒ W 5 Q R X W 5 Q R X d S )Nr  r  r  zpython-xlib-42.tar.gzr<  r9  r  rc   rý   rf   r~   r    ÚlinkszØ
                        from setuptools import installer, setup
                        setup(setup_requires='python-xlib==42',
                        dependency_links={dependency_links!r})
                        r  z¢
                        [easy_install]
                        index_url = {index_url}
                        find_links = {find_links}
                        r]  )r^  rG   r8  )r   r   r  rÖ   rE  rH   r   rI   r›   r¢   r£   r   r3  r   )	r    r   ra  r#  r  r$  r?  r@  r  r   r   r   Ú0test_setup_requires_with_find_links_in_setup_cfg‹  sD    

  ÿ
ÿúÿ	ÿøÿzBTestSetupRequires.test_setup_requires_with_find_links_in_setup_cfgc                 C   s"  t  ¡ �� t  ¡ �ú}ttj |d¡ddƒ tj |d¡}t |¡ tjt	dƒddœ|d� t
tj |d	¡d
gƒ t |¡ tj |d¡}tj |d	¡}t |¡ t|ddd��}| t	dƒ¡ W 5 Q R X | dt|ƒ¡ | dd¡ | dd¡ | dd¡ t
|dgƒ W 5 Q R X W 5 Q R X dS )zÅ
        Use case: installing a package with a build dependency on
        an already installed `dep[extra]`, which in turn depends
        on `extra_dep` (whose is not already installed).
        úextra_dep-1.0.tar.gzZ	extra_deprP  rO  a  
                          import setuptools
                          setuptools.setup(
                              name='dep', version='2.0',
                              extras_require={'extra': ['extra_dep']},
                          )
                         re   rG  rH  rc   Ú	dist_infor  rf   r~   r    ú”
                        from setuptools import installer, setup
                        setup(setup_requires='dep[extra]')
                        ÚPIP_FIND_LINKSr   rN  r  r  r  r8  N)r   r  rÖ   rE  rH   r   rI   r›   rJ  r   r   r	   Ú	add_entryr¢   r£   r   ri   ©r    r   r#  Zdep_pkgr  r$  r@  r   r   r   Ú4test_setup_requires_with_transitive_extra_dependency·  sB    
  ÿ
ÿ	öó

ÿÿ	zFTestSetupRequires.test_setup_requires_with_transitive_extra_dependencyc                 C   s6  t  ¡ ��" t  ¡ ��}ttj |d¡dtdƒfddgƒ tj |d¡}t |¡ tj	tdƒdtd	ƒd
œ|d� t
tj |d¡dgƒ t |¡ tj |d¡}tj |d¡}t |¡ t|ddd��}| tdƒ¡ W 5 Q R X | dt|ƒ¡ | dd¡ | dd¡ | dd¡ t
|dgƒ W 5 Q R X W 5 Q R X dS )zk
        Use case: ensure build requirements' extras
        are properly installed and activated.
        rd  rc   a$  
                          import setuptools
                          setuptools.setup(
                              name='extra_dep',
                              version='1.0',
                              py_modules=['extra_dep'],
                          )
                          r  )zextra_dep.pyre   Zepdepa(  
                          import setuptools
                          setuptools.setup(
                              name='dep', version='2.0',
                              py_modules=['epcmd'],
                              extras_require={'extra': ['extra_dep']},
                              entry_points='''
                                           [distutils.commands]
                                           epcmd = epcmd:epcmd [extra]
                                           ''',
                          )
                         re   a  
                                     from distutils.command.build_py import build_py

                                     import extra_dep

                                     class epcmd(build_py):
                                         pass
                                     )rc   rý   zepcmd.pyrH  re  r  rf   r~   r    rf  rg  r   rN  r  r  r  ZepcmdN)r   r  rÖ   rƒ   rH   r   rI   r   r›   rJ  r   r	   rh  r¢   r£   r   ri   ri  r   r   r   Ú.test_setup_requires_with_distutils_command_depì  sT    ÿþñþ
ÿÿðä

ÿÿ	z@TestSetupRequires.test_setup_requires_with_distutils_command_depN)r&   r'   r(   r  rÑ   rÒ   rÓ   r	  r  rS   r‹   Zparametrizer&  r2  r:  rA  rF  rM  r`  rc  rj  rk  r   r   r   r   r  4  s&   

C
*:
+5r  c                 C   s"   t | dtd||f ƒfdgƒ dS )z\
    Create a simple sdist tarball at dist_path, containing just a simple
    setup.py.
    rc   zŒ             import setuptools
             setuptools.setup(
                 name=%r,
                 version=%r
             )
         r  N)rƒ   r   )r  r4  r  r   r   r   rE  A  s    ùÿþòþrE  c           
         s¶   d|kst ‚| d¡‰ ˆ d }‡ fdd„tdtˆ ƒd ƒD ƒ}td||||f ƒ}d}d|ftj |d	¡|fg}|dd
… D ]*}tjj| d¡d	g Ž }	| |	df¡ q|t	| |ƒ d
S )z¼
    Make an sdist tarball with distname and version which also contains one
    package with the same name as distname.  The top-level package is
    designated a namespace package).
    rQ  r   c                    s   g | ]}d   ˆ d|… ¡‘qS )rQ  N)rI   )rê   Úidx©Úpartsr   r   r  h  s     z$make_nspkg_sdist.<locals>.<listcomp>r   z¬        import setuptools
        setuptools.setup(
            name=%r,
            version=%r,
            packages=%r,
            namespace_packages=[%r]
        )
    z7__import__('pkg_resources').declare_namespace(__name__)rc   z__init__.pyNre   )
r7   ÚsplitÚranger!  r   rH   r   rI   r�   rƒ   )
r  r4  r  Z	nspackageÚpackagesrL  Úinitrn   Úpackagerq   r   rm  r   r)  \  s    
 	
÷ÿr)  c                 C   s&   t | dtdƒj|||d�fdgƒ d S )Nrc   zå                import setuptools
                setuptools.setup(
                  name={name!r},
                  version={version!r},
                  python_requires={python_requires!r},
                )
                )r   r  Úpython_requiresr  )rƒ   r   r3  )r  r4  r  rt  r   r   r   rX  �  s    ÿ
  öþðþrX  c              	   C   s€   t |ƒdkst‚t | d¡�Z}|D ]N\}}t | d¡¡}tj|d�}t | ¡ ƒ|_	t
t ¡ ƒ|_|j||d� q"W 5 Q R X dS )z…
    Create a simple sdist tarball at dist_path, containing the files
    listed in ``files`` as ``(filename, content)`` tuples.
    r   zw:gzr~   ©r   )ÚfileobjN)r!  r7   r*  r¢   ÚioÚBytesIOr   ÚTarInfor/  ÚsizeÚintÚtimeÚmtimeÚaddfile)r  rn   r<   rq   rr   Z
file_bytesÚ	file_infor   r   r   rƒ   ™  s    rƒ   r  r'  r   c              	   C   sr  t |ƒ}dd|› d|› �gtj | ¡gdœ}|r:| |¡ tj | d¡}	t |	¡ |rÒg }
g }|D ]N}| |¡}|d ¡ kr‚|}n|
}t	|t
tfƒržd |¡}| d||f ¡ qbtdƒjd	 |
¡d	 |¡d
�}nd}ttj |	d¡ddd��}| |¡ W 5 Q R X |dk�rtdƒ}ttj |	d¡ddd��}| || ¡ W 5 Q R X tj | |› d|› d�¡}||||ƒ |	S )a—  Creates a source tree under path for a trivial test package that has a
    single requirement in setup_requires--a tarball for that requirement is
    also created and added to the dependency_links argument.

    ``distname`` and ``version`` refer to the name/version of the package that
    the test package requires via ``setup_requires``.  The name of the test
    package itself is just 'test_pkg'.
    r  r  z==)r   r  r  r  zname versionú;z%s: %szg
            [metadata]
            {metadata}
            [options]
            {options}
            Ú
)ÚoptionsÚmetadatare   rý   rf   r~   r    NzI            import setuptools
            setuptools.setup(**%r)
        rc   ú-z.tar.gz)r   rH   r   ÚabspathÚupdaterI   r›   Úpopro  Ú
isinstanceÚtupler[  r�   r   r3  r¢   r£   )r   r4  r  r7  Zsetup_py_templater6  r  Znormalized_distnameZtest_setup_attrsr  r‚  rƒ  r   ÚvalueÚsectionZtest_setup_cfg_contentsr¥   Zfoobar_pathr   r   r   r  ª  sN    ü



ÿ÷
ÿr  Újavaz0Test cannot run under java when executable is shr†   c                   @   s4   e Zd ZdZdZdd„ Zdd„ Zdd„ Zd	d
„ ZdS )ÚTestScriptHeaderu   /Users/JosÃ©/bin/pythonz$C:\Program Files\Python36\python.exec                 C   s4   dt  tj tj¡¡ }t j d¡}||ks0t	‚d S )Nz#!%s
z#!/usr/local/bin/python©
r,   Znt_quote_argrH   r   Únormpathr�   rð   r2   Ú
get_headerr7   ©r    rÆ   rÅ   r   r   r   Útest_get_script_headerÿ  s    z'TestScriptHeader.test_get_script_headerc                 C   s4   dt  tj tj¡¡ }t j d¡}||ks0t	‚d S )Nú#!%s -x
z#!/usr/bin/python -xrŽ  r‘  r   r   r   Útest_get_script_header_args  s    z,TestScriptHeader.test_get_script_header_argsc                 C   s,   t jjd| jd�}d| j }||ks(t‚d S )Nú#!/usr/bin/python©rð   r“  )r,   r2   r�  Únon_ascii_exer7   ©r    rÅ   rÆ   r   r   r   Ú$test_get_script_header_non_ascii_exe	  s     ÿ
z5TestScriptHeader.test_get_script_header_non_ascii_exec                 C   s4   t jjdd| j d d�}d| j }||ks0t‚d S )Nr•  ú"r–  z#!"%s"
)r,   r2   r�  Úexe_with_spacesr7   r˜  r   r   r   Ú&test_get_script_header_exe_with_spaces  s     ÿ
z7TestScriptHeader.test_get_script_header_exe_with_spacesN)	r&   r'   r(   r—  r›  r’  r”  r™  rœ  r   r   r   r   r�  ÷  s   r�  c                   @   sV   e Zd Zdd„ Zdd„ Ze dej¡ej 	e
j¡dd„ ƒƒZdd	„ Zd
dœdd„Zd
S )ÚTestCommandSpecc                 C   s"   t  ddg¡}| ¡ dkst‚dS )zx
        Show how a custom CommandSpec could be used to specify a #! executable
        which takes parameters.
        z/usr/bin/envÚpython3z#!/usr/bin/env python3
N)r,   r-   r0   r7   ©r    rP   r   r   r   Útest_custom_launch_command  s    z*TestCommandSpec.test_custom_launch_commandc                 C   s(   t  dg¡}t j |¡}||ks$t‚dS )zG
        from_param should return an instance of a CommandSpec
        ÚpythonN)r,   r-   Ú
from_paramr7   )r    rP   Zcmd_newr   r   r   Ú.test_from_param_for_CommandSpec_is_passthrough!  s    z>TestCommandSpec.test_from_param_for_CommandSpec_is_passthroughzsys.executablec                 C   s>   t j dd ¡ tj ¡ }t|ƒdks(t‚| ¡  	d¡s:t‚d S )NÚ__PYVENV_LAUNCHER__r   z#!")
rH   r|   r‡  r,   r-   r/   r!  r7   r0   r6   rŸ  r   r   r   Ú/test_from_environment_with_spaces_in_executable)  s    
z?TestCommandSpec.test_from_environment_with_spaces_in_executablec                 C   s0   t j d¡}t|ƒdkst‚d| ¡ ks,t‚dS )z†
        In order to support `executable = /usr/bin/env my-python`, make sure
        from_param invokes shlex on that input.
        z/usr/bin/env my-pythonr*   rš  N)r,   r-   r¢  r!  r7   r0   rŸ  r   r   r   Ú"test_from_simple_string_uses_shlex1  s    z2TestCommandSpec.test_from_simple_string_uses_shlexN)Úreturnc              	   C   s@   t  t¡�}tj tƒ ¡ W 5 Q R X t|jƒdks<t	|jƒ‚dS )zc
        from_param should raise its own TypeError when the argument's type is unsupported
        z1Argument has an unsupported type <class 'object'>N)
rS   rT   Ú	TypeErrorr,   r-   r¢  Úobjectri   rŠ  r7   )r    Úexc_infor   r   r   Ú%test_from_param_raises_expected_error:  s    ÿþz5TestCommandSpec.test_from_param_raises_expected_error)r&   r'   r(   r   r£  r   r½   r�  r›  r¿   rH   r|   r¥  r¦  r«  r   r   r   r   r�    s   	r�  c                   @   s   e Zd Zdd„ ZdS )ÚTestWindowsScriptWriterc                 C   sN   t j d¡}| d¡st‚| d¡s(t‚| d¡}| d¡}| d¡rJt‚d S )Nre   z#!r�  z\")r,   ZWindowsScriptWriterr�  r6   r7   ÚendswithÚlstripÚrstrip)r    Úhdrr   r   r   Útest_headerF  s    

z#TestWindowsScriptWriter.test_headerN)r&   r'   r(   r±  r   r   r   r   r¬  E  s   r¬  c                   @   s6   e Zd ZU eed< eed< eed< eed< eed< dS )ÚVersionStubÚmajorÚminorÚmicroÚreleaselevelÚserialN)r&   r'   r(   r{  Ú__annotations__ri   r   r   r   r   r²  P  s
   
r²  c              
   C   sV  t ƒ }| d¡}dg|_d|_d|_t| ƒ|_d |_| d¡}t| ƒ|_d |_| ¡ �v}t	 
¡ �b t	 d¡ d}tdd	d
ddƒ}| dd¡ | d|¡ | d|¡ | |dt ¡ ¡ | ¡  W 5 Q R X W 5 Q R X ttdƒràdnd}	|j ¡ }
t |	d |
¡�rt |	d |
¡�st‚|jd dk�s*t‚|jd dk�s>t‚|jd dk�sRt‚d S )NrF   rE   r   Trá   Úignorez:3.10.1 (main, Dec 21 2021, 09:17:12) [GCC 10.2.1 20210110]é   é
   r   Úfinalr¨   zsys.versionzsys.version_infoÚcreate_home_pathÚpypy_version_infoÚpypyr¡  z3\.?1z3\.?1\dÚ
py_versionz3.10.1Úpy_version_shortz3.10Úpy_version_nodotZ310)r   Úget_command_objr=   Úoptimizer¯   ri   Úinstall_userbaseÚinstall_usersiteÚcontextÚwarningsÚcatch_warningsÚsimplefilterr²  r]   r   rÐ   Úfinalize_optionsÚhasattrr�   rL   Úlowerr8   r9   r7   Úconfig_vars)rm   Z
tmpdir_cwdr   r<   rP   Zinstall_cmdr½   r  r¸   r   rL   r   r   r   Ú&test_use_correct_python_version_stringX  s4    





	rÏ  c                 C   s:  |  dd¡ | dt|d ƒ¡ | dt|d ƒ¡ | dt|d ƒ¡ |  dd¡ |  d	d¡ tt ¡ ƒ}|jd
d
d� |d }|jd
d
d� |  dt|ƒ¡ d}|d j|dd� t| 	d¡ƒg ksÌt
‚t| 	d¡ƒg ksât
‚tdddgƒ t| 	d¡ƒg k�st
‚dd„ | 	d¡D ƒ}|dh }|dhk�s6t
‚dS )zC`setup.py develop` should honor `--user` even under build isolationr¨   FÚHOMEz.homeÚUSERPROFILEÚAPPDATAzsite.USER_BASENzsite.USER_SITET)Úparentsrà   z.sys_prefixz
sys.prefixzF__import__('setuptools').setup(name='aproj', version=42, packages=[])
rc   r~   r    Ú*Údevelopz--userc                 S   s   h | ]
}|j ’qS r   ru  )rê   r¥   r   r   r   rì   ¼  s     z9test_editable_user_and_build_isolation.<locals>.<setcomp>zeasy-install.pthzaproj.egg-link)r]   r   ri   r   r^   Úgetusersitepackagesr›   rþ   r[  Úglobr7   r   )r¦   r   rú   Ú	user_siteÚ
sys_prefixZsetup_scriptÚ	installedr   r   r   Ú&test_editable_user_and_build_isolation†  s*    ÿ
rÛ  )TÚ__doc__rÒ   rw  r4   r³   rH   rK  r8   r^   rò   r�   r*  rJ   r|  rÈ  rg   r   Útypingr   Zunittestr   rS   Zjaracor   r–   rÉ   rÊ   rF   r,   r   r“   r   r	   Ú
setuptoolsr
   Zsetuptools._normalizationr   r   Zsetuptools.distZsetuptools.sandboxr   Zsetuptools.testsr   Zsetuptools.tests.serverr   r   re   r   Útextwrapr   Údistutils.errorsrU   rŠ   r   r   r¤   r)   r‹   Úfilterwarningsr�   r¦   Zusefixturesr§   rØ   rÛ   rÜ   rÞ   r  rE  r)  rX  rƒ   r  rŒ   rŽ   r6   Zis_shrð   r�  r�  r¬  r²  rÏ  rÛ  r   r   r   r   Ú<module>   s    

	
ÿ	 `
D


[

G    %ù
Mþ-.