ó
    µ'Ôi  ã                   óÜ   • S r SSKrSSKrSSKrSSKrSSKrSSKrSSKrSSKJ	r	  SSK
r
SSKJr  \
R                  R                  S5       " S S5      5       r " S S	5      rS
 rS rS rS rg)z&Support code for distutils test cases.é    N)ÚDistribution)Úalways_iterableÚdistutils_managed_tempdirc                   ó2   • \ rS rSrSrS rSS jrS	S jrSrg)
ÚTempdirManageré   zA
Mix-in class that handles temporary directories for test cases.
c                 óf   • [         R                  " 5       nU R                  R                  U5        U$ )zZCreate a temporary directory that will be cleaned up.

Returns the path of the directory.
)ÚtempfileÚmkdtempÚtempdirsÚappend)ÚselfÚds     Úb/var/www/surfInsights/venv3-11/lib/python3.13/site-packages/setuptools/_distutils/tests/support.pyr   ÚTempdirManager.mkdtemp   s)   € ô
 ×ÒÓˆØ�‰×Ñ˜QÔØˆó    c                 óX   • [         R                  " [        U5      6 R                  USS9  g)zFWrites 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_fileÚTempdirManager.write_file   s%   € ô
 	�Š”o dÓ+Ð,×7Ñ7¸È'Ð7ÒRr   c                 ó¤   • U R                  5       n[        R                  R                  X15      n[        R                  " U5        [        US9nXE4$ )z×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_distÚTempdirManager.create_dist&   s?   € ð —,‘,“.ˆÜ—'‘'—,‘,˜wÓ1ˆÜ
�Š�ÔÜ "Ñ%ˆàˆ}Ðr   © N)Úxxx)Úfoo)	Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r   r&   Ú__static_attributes__r(   r   r   r   r      s   † ñòôS÷r   r   c                   ó$   • \ rS rSrSrS rS rSrg)ÚDummyCommandé8   zAClass to store options for retrieval via set_undefined_options().c                 ó8   • [        U 5      R                  U5        g ©N)ÚvarsÚupdate)r   Úkwargss     r   Ú__init__ÚDummyCommand.__init__;   s   € ÜˆT‹
×Ñ˜&Õ!r   c                 ó   • g r5   r(   )r   s    r   Úensure_finalizedÚDummyCommand.ensure_finalized>   s   € Ør   r(   N)r+   r,   r-   r.   r/   r9   r<   r0   r(   r   r   r2   r2   8   s   † ÙKò"õr   r2   c                 ó~   • [         R                  " [        5       [        R                  R                  U S5      5        g)aO  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_crD   B   s%   € ô ‡K‚KÔ"Ó$¤b§g¡g§l¡l°9¸lÓ&KÕLr   c                  ó´   • [         R                  S:”  a  SOSn [        R                  R	                  [        R                  R                  [        5      U 5      $ )N)é   é	   r?   zxxmodule-3.8.c)ÚsysÚversion_infor   r   r   ÚdirnameÚ__file__)Úsource_names    r   rB   rB   Q   s9   € Ü"%×"2Ñ"2°VÓ";‘,ÐAQ€KÜ�7‰7�<‰<œŸ™Ÿ™¬Ó1°;Ó?Ð?r   c                 óÖ  • [         R                  S:X  a%  [        R                  R	                  S5      U l        g[        R                  " S5      (       a�  [        R                  " S5      nUc	  S/U l        g[        R                  S:X  a  / U l        gUR                  S5      u  p#nUR                  [         R                  5       Vs/ s H  oU(       d  M  UPM     snU l        ggs  snf )	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   ÚnamerH   Ú
executableÚendswithÚdebugÚ	sysconfigÚget_config_varÚlibrary_dirsÚplatformÚ	partitionÚsplitÚpathsep)ÚcmdÚ	runsharedrT   ÚequalsÚvaluer   s         r   Úfixup_build_extrc   V   sµ   € ô( 
‡w�w�$ƒÜ—N‘N×+Ñ+¨HÓ5ˆ�	Ü	×	!Ò	!Ð"4×	5Ñ	5ô ×,Ò,¨[Ó9ˆ	ØÑØ #˜uˆCÕä�|‰|˜xÓ'Ø#%�Õ à&/×&9Ñ&9¸#Ó&>Ñ#�˜eØ/4¯{©{¼2¿:¹:Ô/FÓ#LÒ/F¨!Ë!§AÑ/FÑ#L�Õ ð 
6ùò $Ms   Ã
C&ÃC&c           	      ó°   • [         R                  " U /U R                  5       VVs/ s H  n[        US/ 5        H  nUPM     M     snnU l        U $ s  snnf )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__Úgetattrre   )ÚclsÚbaseÚmarks      r   Úcombine_markersrm   {   sV   € ô —O’O S E¨3¯=©=Ô9ôâ9ˆDÜ˜D ,°×3ˆDó 	á3ñ 	Ù9ò€C„Nð
 €Jùós   ¦!A)r/   rf   r   r   r@   rH   rX   r
   Údistutils.corer   ÚpytestÚmore_itertoolsr   rl   Úusefixturesr   r2   rD   rB   rc   rm   r(   r   r   Ú<module>rr      sr   ðÙ ,ã Û 	Û Û Û 
Û Û Ý 'ã Ý *ð ‡�×ÑÐ4Ó5÷$ð $ó 6ð$÷Nñ òMò@ò
"MóJr   