§
    WŠtj  ã                   óî   — 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m	Z	 ddl
Z
ddlmZ e
j                             d¦  «         G d„ d¦  «        ¦   «         Z G d„ d	¦  «        Zd
„ Zd„ Zd„ Zd„ ZdS )z&Support code for distutils test cases.é    N)ÚDistribution)Úalways_iterableÚdistutils_managed_tempdirc                   ó(   — e Zd ZdZd„ Zdd„Zd	d„ZdS )
ÚTempdirManagerzI
    Mix-in class that handles temporary directories for test cases.
    c                 ó`   — t          j        ¦   «         }| j                             |¦  «         |S )zjCreate a temporary directory that will be cleaned up.

        Returns the path of the directory.
        )ÚtempfileÚmkdtempÚtempdirsÚappend)ÚselfÚds     úa/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/setuptools/_distutils/tests/support.pyr
   zTempdirManager.mkdtemp   s-   € õ
 ÔÑÔˆØŒ×Ò˜QÑÔÐØˆó    Úxxxc                 óf   — t          j        t          |¦  «        Ž                      |d¬¦  «         dS )zVWrites a file in the given path.

        path can be a string or a sequence.
        zutf-8)ÚencodingN)ÚpathlibÚPathr   Ú
write_text)r   ÚpathÚcontents      r   Ú
write_filezTempdirManager.write_file   s2   € õ
 	Œ•o dÑ+Ô+Ð,×7Ò7¸È'Ð7ÑRÔRÐRÐRÐRr   Úfooc                 óº   — |                       ¦   «         }t          j                             ||¦  «        }t          j        |¦  «         t          |¬¦  «        }||fS )a  Will generate a test environment.

        This function creates:
         - a Distribution instance using keywords
         - a temporary directory with a package structure

        It returns the package directory and the distribution
        instance.
        )Úattrs)r
   Úosr   ÚjoinÚmkdirr   )r   Úpkg_nameÚkwÚtmp_dirÚpkg_dirÚdists         r   Úcreate_distzTempdirManager.create_dist&   sP   € ð —,’,‘.”.ˆÝ”'—,’,˜w¨Ñ1Ô1ˆÝ
Œ�ÑÔÐÝ "Ð%Ñ%Ô%ˆà˜ˆ}Ðr   N)r   )r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r
   r   r%   © r   r   r   r      sY   € € € € € ðð ðð ð ðSð Sð Sð Sðð ð ð ð ð r   r   c                   ó   — e Zd ZdZd„ Zd„ ZdS )ÚDummyCommandzAClass to store options for retrieval via set_undefined_options().c                 óJ   — t          | ¦  «                             |¦  «         d S ©N)ÚvarsÚupdate)r   Úkwargss     r   Ú__init__zDummyCommand.__init__;   s"   € ÝˆT‰
Œ
×Ò˜&Ñ!Ô!Ð!Ð!Ð!r   c                 ó   — d S r.   r*   )r   s    r   Úensure_finalizedzDummyCommand.ensure_finalized>   s   € Øˆr   N)r&   r'   r(   r)   r2   r4   r*   r   r   r,   r,   8   s8   € € € € € ØKÐKð"ð "ð "ðð ð ð ð r   r,   c                 ó„   — t          j        t          ¦   «         t          j                             | d¦  «        ¦  «         dS )ak  Helper for tests that need the xxmodule.c source file.

    Example use:

        def test_compile(self):
            copy_xxmodule_c(self.tmpdir)
            self.assertIn('xxmodule.c', os.listdir(self.tmpdir))

    If the source file can be found, it will be copied to *directory*.  If not,
    the test will be skipped.  Errors during copy are not caught.
    ú
xxmodule.cN)ÚshutilÚcopyÚ_get_xxmodule_pathr   r   r   )Ú	directorys    r   Úcopy_xxmodule_cr;   B   s3   € õ „KÕ"Ñ$Ô$¥b¤g§l¢l°9¸lÑ&KÔ&KÑLÔLÐLÐLÐLr   c                  ó®   — t           j        dk    rdnd} t          j                             t          j                             t          ¦  «        | ¦  «        S )N)é   é	   r6   zxxmodule-3.8.c)ÚsysÚversion_infor   r   r   ÚdirnameÚ__file__)Úsource_names    r   r9   r9   Q   s=   € Ý"%Ô"2°VÒ";Ð";�,�,ÐAQ€KÝŒ7�<Š<�œŸš­Ñ1Ô1°;Ñ?Ô?Ð?r   c                 óž  — t           j        dk    r&t          j                             d¦  «        | _        dS t          j        d¦  «        r‚t          j        d¦  «        }|€
dg| _        dS t          j	        dk    r	g | _        dS | 
                    d¦  «        \  }}}d	„ |                     t           j        ¦  «        D ¦   «         | _        dS dS )
aÑ  Function needed to make build_ext tests pass.

    When Python was built with --enable-shared on Unix, -L. is not enough to
    find libpython<blah>.so, because regrtest runs in a tempdir, not in the
    source directory where the .so lives.

    When Python was built with in debug mode on Windows, build_ext commands
    need their debug attribute set, and it is not done automatically for
    some reason.

    This function handles both of these things.  Example use:

        cmd = build_ext(dist)
        support.fixup_build_ext(cmd)
        cmd.ensure_finalized()

    Unlike most other Unix platforms, Mac OS X embeds absolute paths
    to shared libraries into executables, so the fixup is not needed there.
    Úntz_d.exeÚPy_ENABLE_SHAREDÚ	RUNSHAREDNú.Údarwinú=c                 ó   — g | ]}|¯|‘ŒS r*   r*   )Ú.0r   s     r   ú
<listcomp>z#fixup_build_ext.<locals>.<listcomp>x   s   € Ð#LÐ#LÐ#L¨!È!Ð#L AÐ#LÐ#LÐ#Lr   )r   Únamer?   Ú
executableÚendswithÚdebugÚ	sysconfigÚget_config_varÚlibrary_dirsÚplatformÚ	partitionÚsplitÚpathsep)ÚcmdÚ	runsharedrN   ÚequalsÚvalues        r   Úfixup_build_extr]   V   sÒ   € õ( 
„w�$‚€Ý”N×+Ò+¨HÑ5Ô5ˆŒ	ˆ	ˆ	Ý	Ô	!Ð"4Ñ	5Ô	5ð Mõ Ô,¨[Ñ9Ô9ˆ	ØÐØ #˜uˆCÔÐÐåŒ|˜xÒ'Ð'Ø#%�Ô Ð Ð à&/×&9Ò&9¸#Ñ&>Ô&>Ñ#��f˜eØ#LÐ#L¨u¯{ª{½2¼:Ñ/FÔ/FÐ#LÑ#LÔ#L�Ô Ð Ð ðMð Mr   c                 óZ   — d„ t          j        | g| j        ¦  «        D ¦   «         | _        | S )z®
    pytest will honor markers as found on the class, but when
    markers are on multiple subclasses, only one appears. Use
    this decorator to combine those markers.
    c                 ó:   — g | ]}t          |d g ¦  «        D ]}|‘ŒŒS )Ú
pytestmark)Úgetattr)rL   ÚbaseÚmarks      r   rM   z#combine_markers.<locals>.<listcomp>�   sK   € ð ð ð àÝ˜D ,°Ñ3Ô3ðð ð ð 	ðð ð ð r   )Ú	itertoolsÚchainÚ	__bases__r`   )Úclss    r   Úcombine_markersrh   {   s9   € ðð å”O S E¨3¬=Ñ9Ô9ðñ ô €C„Nð
 €Jr   )r)   rd   r   r   r7   r?   rR   r	   Údistutils.corer   ÚpytestÚmore_itertoolsr   rc   Úusefixturesr   r,   r;   r9   r]   rh   r*   r   r   ú<module>rm      s<  ðØ ,Ð ,à Ð Ð Ð Ø 	€	€	€	Ø €€€Ø €€€Ø 
€
€
€
Ø Ð Ð Ð Ø €€€Ø 'Ð 'Ð 'Ð 'Ð 'Ð 'à €€€Ø *Ð *Ð *Ð *Ð *Ð *ð „×ÒÐ4Ñ5Ô5ð$ð $ð $ð $ð $ñ $ô $ñ 6Ô5ð$ðNð ð ð ð ñ ô ð ðMð Mð Mð@ð @ð @ð
"Mð "Mð "MðJð ð ð ð r   