Ë
    nûàg2  ã                  óš   — d Z 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	m
Z
 ddlmZ ddlmZ ddlmZ d	„ Zdd
„Zdd„Zdd„Zdd„Zy)z–distutils.spawn

Provides the 'spawn()' function, a front-end to various platform-
specific functions for launching another program in a sub-process.
é    )ÚannotationsN)ÚMappingé   )Úlog©ÚDEBUG)ÚDistutilsExecErrorc                ó   — t         r| S | d   S )zE
    Render a subprocess command differently depending on DEBUG.
    r   r   )Úcmds    úY/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/setuptools/_distutils/spawn.pyÚ_debugr      s   € õ ˆ3Ð#˜S ™VÐ#ó    c                ó€   — t        j                  «       dk7  r| S ddlm}m}  |«       }|r||ini }i t        | «      ¥|¥S )NÚDarwinr   )ÚMACOSX_VERSION_VARÚget_macosx_target_ver)ÚplatformÚsystemÚutilr   r   Ú_resolve)Úenvr   r   Ú
target_verÚupdates        r   Ú_inject_macos_verr      sD   € Ü‡�Ó˜HÒ$Øˆ
ç?á&Ó(€JÙ1;Ð  *Ñ-À€FØ&Œh�s‹mÐ&˜vÐ&Ð&r   c                ó*   — | €t         j                  S | S ©N)ÚosÚenviron©r   s    r   r   r   (   s   € Ø˜Œ2�:‰:Ð-¨#Ð-r   c                óÆ  — t        j                  t        j                  | «      «       |ry|rt	        j
                  | d   «      }|�|| d<   	 t        j                  | t        |«      ¬«       y# t        $ r-}t        dt        | «      ›d|j                  d   › �«      |‚d}~wt        j                  $ r*}t        dt        | «      ›d|j                  › �«      |‚d}~ww xY w)a�  Run another program, specified as a command list 'cmd', in a new process.

    'cmd' is just the argument list for the new process, ie.
    cmd[0] is the program to run and cmd[1:] are the rest of its arguments.
    There is no way to run a program with a name different from that of its
    executable.

    If 'search_path' is true (the default), the system's executable
    search path will be used to find the program; otherwise, cmd[0]
    must be the exact path to the executable.  If 'dry_run' is true,
    the command will not actually be run.

    Raise DistutilsExecError if running the program fails in any way; just
    return on success.
    Nr   r   zcommand z	 failed: éÿÿÿÿz failed with exit code )r   ÚinfoÚ
subprocessÚlist2cmdlineÚshutilÚwhichÚ
check_callr   ÚOSErrorr	   r   ÚargsÚCalledProcessErrorÚ
returncode)r   Úsearch_pathÚverboseÚdry_runr   Ú
executableÚexcÚerrs           r   Úspawnr2   ,   s×   € ô  ‡H�HŒZ×$Ñ$ SÓ)Ô*ÙØáÜ—\‘\ # a¡&Ó)ˆ
ØÐ!ØˆC�‰Fð	Ü×Ñ˜cÔ'8¸Ó'=Ö>øÜò Ü Ø”v˜c“{�o Y¨s¯x©x¸©|¨nÐ=ó
àð	ûô ×(Ñ(ò Ü Ø”v˜c“{�oÐ%<¸S¿^¹^Ð<LÐMó
àð	ûðús$   Á A/ Á/	C Á8(B Â C Â6%CÃC c                ó’  — t        j                  dt        d¬«       t        j                  j                  | «      \  }}t        j                  dk(  r
|dk7  r| dz   } t        j                  j                  | «      r| S |€8t        j                  j                  dd«      }|€	 t        j                  d«      }|sy|j                  t        j                   «      }|D ]E  }t        j                  j#                  || «      }t        j                  j                  |«      sŒC|c S  y# t        t        f$ r t        j                  }Y ŒŽw xY w)	zÚTries to find 'executable' in the directories listed in 'path'.

    A string listing directories separated by 'os.pathsep'; defaults to
    os.environ['PATH'].  Returns the complete filename or None if not found.
    z+Use shutil.which instead of find_executableé   )Ú
stacklevelÚwin32z.exeNÚPATHÚCS_PATH)ÚwarningsÚwarnÚDeprecationWarningr   ÚpathÚsplitextÚsysr   Úisfiler   ÚgetÚconfstrÚAttributeErrorÚ
ValueErrorÚdefpathÚsplitÚpathsepÚjoin)r/   r<   Ú_ÚextÚpathsÚpÚfs          r   Úfind_executablerM   Q   s  € ô ‡M�MØ5Ô7IÐVWõô �W‰W×Ñ˜jÓ)�F€A€sÜ�‰˜Ò c¨V¢mØ &Ñ(ˆ
ä	‡w�w‡~�~�jÔ!ØÐà€|Ü�z‰z�~‰~˜f dÓ+ˆàˆ<ð"Ü—z‘z )Ó,�ñ Øà�J‰J”r—z‘zÓ"€EØò ˆÜ�G‰G�L‰L˜˜JÓ'ˆÜ�7‰7�>‰>˜!ÕàŠHð	ð
 øô #¤JÐ/ò "ä—z‘z’ð"ús   Â"D$ Ä$EÅE)r   úMapping[str:str] | NoneÚreturnrN   )r   rN   rO   zMapping[str:str])TFFNr   )Ú__doc__Ú
__future__r   r   r   r%   r#   r>   r9   Úcollections.abcr   Ú_logr   Údebugr   Úerrorsr	   r   r   r   r2   rM   © r   r   ú<module>rW      sG   ðñõ #ã 	Û Û Û Û 
Û Ý #å Ý Ý &ò$ó'ó.ó"ôJ$r   