Ë
    nûàg  ã                   óÜ   — 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                  j                  d«       G d„ d«      «       Z G d„ d	«      Zd
„ Zd„ Zd„ Zd„ Zy)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y)ÚTempdirManagerzI
    Mix-in class that handles temporary directories for test cases.
    c                 ód   — t        j                  «       }| 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/skyplay_api_hub/venv/lib/python3.12/site-packages/setuptools/_distutils/tests/support.pyr
   zTempdirManager.mkdtemp   s)   € ô
 ×ÑÓˆØ�‰×Ñ˜QÔØˆó    c                 ó\   — t        j                  t        |«      Ž j                  |d¬«       y)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   s%   € ô
 	�‰”o dÓ+Ð,×7Ñ7¸È'Ð7ÕRr   c                 ó¬   — | j                  «       }t        j                  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&   sC   € ð —,‘,“.ˆÜ—'‘'—,‘,˜w¨Ó1ˆÜ
�‰�ÔÜ "Ô%ˆà˜ˆ}Ðr   N)Úxxx)Úfoo)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r
   r   r#   © r   r   r   r      s   „ ñòóSôr   r   c                   ó   — e Zd ZdZd„ Zd„ Zy)ÚDummyCommandzAClass to store options for retrieval via set_undefined_options().c                 ó8   — t        | «      j                  |«       y ©N)ÚvarsÚupdate)r   Úkwargss     r   Ú__init__zDummyCommand.__init__;   s   € ÜˆT‹
×Ñ˜&Õ!r   c                  ó   — y 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   s   „ ÙKò"ór   r,   c                 ó|   — t        j                  t        «       t        j                  j                  | d«      «       y)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   s%   € ô ‡K�KÔ"Ó$¤b§g¡g§l¡l°9¸lÓ&KÕLr   c                  ó²   — t         j                  dkD  rdnd} t        j                  j	                  t        j                  j                  t        «      | «      S )N)é   é	   r6   zxxmodule-3.8.c)ÚsysÚversion_infor   r   r   ÚdirnameÚ__file__)Úsource_names    r   r9   r9   Q   s9   € Ü"%×"2Ñ"2°VÒ";‘,ÐAQ€KÜ�7‰7�<‰<œŸ™Ÿ™¬Ó1°;Ó?Ð?r   c                 ó´  — t         j                  dk(  r%t        j                  j	                  d«      | _        yt        j                  d«      r†t        j                  d«      }|€	dg| _        yt        j                  dk(  rg | _        y|j                  d«      \  }}}|j                  t         j                  «      D �cg c]  }|sŒ|‘Œ	 c}| _        yyc c}w )	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ú=)r   Únamer?   Ú
executableÚendswithÚdebugÚ	sysconfigÚget_config_varÚlibrary_dirsÚplatformÚ	partitionÚsplitÚpathsep)ÚcmdÚ	runsharedrK   ÚequalsÚvaluer   s         r   Úfixup_build_extrZ   V   s®   € ô( 
‡w�w�$‚Ü—N‘N×+Ñ+¨HÓ5ˆ�	Ü	×	!Ñ	!Ð"4Ô	5ô ×,Ñ,¨[Ó9ˆ	ØÐØ #˜uˆCÕä�|‰|˜xÒ'Ø#%�Õ à&/×&9Ñ&9¸#Ó&>Ñ#��f˜eØ/4¯{©{¼2¿:¹:Ó/FÖ#L¨!Ê!¢AÒ#L�Õ ð 
6ùò $Ms   Â?CÃCc           	      ó¢   — t        j                  | g| j                  «      D ��cg c]  }t        |dg «      D ]  }|‘Œ Œ c}}| _        | S c c}}w )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.
    Ú
pytestmark)Ú	itertoolsÚchainÚ	__bases__Úgetattrr\   )ÚclsÚbaseÚmarks      r   Úcombine_markersrd   {   sY   € ô —O‘O S E¨3¯=©=Ó9÷àÜ˜D ,°Ó3òð ò 	ðØó€C„Nð
 €Jùós   ¥A)r)   r]   r   r   r7   r?   rO   r	   Údistutils.corer   ÚpytestÚmore_itertoolsr   rc   Úusefixturesr   r,   r;   r9   rZ   rd   r*   r   r   ú<module>ri      sr   ðÙ ,ã Û 	Û Û Û 
Û Û Ý 'ã Ý *ð ‡�×ÑÐ4Ó5÷$ð $ó 6ð$÷Nñ òMò@ò
"MóJr   