Ë
    ˜šãj²C  ã                   ó  — d Z ddlZddlZddlZddlmZmZmZ ddlZddl	Z
ddlmZ ddlmZ ddlmZmZmZmZ ddl	mZ ddlmZ d	„ Z G d
„ de«      Z G d„ de«      ZdZdZdZd„ Z ej<                  d«      Zd„ Z d„ Z!d„ Z"y)a  distutils.cygwinccompiler

Provides the CygwinCCompiler class, a subclass of UnixCCompiler that
handles the Cygwin port of the GNU C compiler to Windows.  It also contains
the Mingw32CCompiler class which handles the mingw32 port of GCC (same as
cygwin in no-cygwin mode).
é    N)ÚPopenÚPIPEÚcheck_output)ÚUnixCCompiler)Ú
write_file)ÚDistutilsExecErrorÚCCompilerErrorÚCompileErrorÚUnknownFileError)ÚLooseVersion)Úfind_executablec                  ó<  — t         j                  j                  d«      } | dk7  rxt         j                  | dz   | dz    }|dk(  rdgS |dk(  rdgS |d	k(  rd
gS |dk(  rdgS |dk(  rdgS |dk(  rdgS |dk(  rdgS dt        |«      cxk  rdk  rddgS  t	        d|z  «      ‚y)zaInclude the appropriate MSVC runtime library if Python was built
    with MSVC 7.0 or later.
    zMSC v.éÿÿÿÿé   é
   Ú1300Úmsvcr70Ú1310Úmsvcr71Ú1400Úmsvcr80Ú1500Úmsvcr90Ú1600Úmsvcr100Ú1700Úmsvcr110Ú1800Úmsvcr120il  iÐ  ÚucrtÚvcruntime140zUnknown MS Compiler version %s N)ÚsysÚversionÚfindÚintÚ
ValueError)Úmsc_posÚmsc_vers     úp/var/www/html/python-recuperauto-other/env/lib/python3.12/site-packages/setuptools/_distutils/cygwinccompiler.pyÚ	get_msvcrr*   @   sà   € ô �k‰k×Ñ˜xÓ(€GØ�"‚}Ü—+‘+˜g a™i¨°©
Ð3ˆØ�fÒà�;ÐØ˜Òà�;ÐØ˜Òà�;ÐØ˜Òà�;ÐØ˜Òà�<ÐØ˜Òà�<ÐØ˜Òà�<ÐØ”S˜“\Ô( DÒ(à˜>Ð*Ð*ð )ô Ð>ÀÑHÓIÐIð7 ó    c                   óR   — e Zd ZdZdZdZdZdZdZdZ	dZ
dd	„Zd
„ Z	 	 	 	 dd„Zdd„Zy)ÚCygwinCCompilerz? Handles the Cygwin port of the GNU C compiler to Windows.
    Úcygwinz.oú.az.dllzlib%s%sz%s%sz.exec           
      ó
  — t        j                  | |||«       t        «       \  }}| j                  d|›d|›d�«       |t        ur| j                  d|z  «       t        j                  j                  dd«      | _	        t        j                  j                  dd«      | _
        d| j                  v r t        «       \  | _        | _        | _        | j                  | j                  d	| j                  ›d
| j                  ›d| j                  ›d�z   «       | j                  dk\  r| j                  | _        nd| _        | j                  dk\  rd}nd}n| j                  | _        d}| j#                  d| j                  z  d| j                  z  d| j                  z  d| j                  z  | j                   ›d|›�¬«       d| j                  v r)| j                  dk(  rdg| _        | j                  d«       y t'        «       | _        y )NzPython's GCC status: z (details: ú)zƒPython's pyconfig.h doesn't seem to support your compiler. Reason: %s. Compiling may fail because of undefined preprocessor macros.ÚCCÚgccÚCXXzg++z: gcc z, ld z
, dllwrap ú
z2.10.90Údllwrapú2.13ú-sharedú-mdll -staticz%s -mcygwin -O -Wallz%s -mcygwin -mdll -O -Wallz%s -mcygwinz
 -mcygwin ©ÚcompilerÚcompiler_soÚcompiler_cxxÚ
linker_exeÚ	linker_soú2.91.57Úmsvcrtz,Consider upgrading to a newer version of gcc)r   Ú__init__Úcheck_config_hÚdebug_printÚCONFIG_H_OKÚwarnÚosÚenvironÚgetÚccÚcxxÚget_versionsÚgcc_versionÚ
ld_versionÚdllwrap_versionÚcompiler_typeÚ
linker_dllÚset_executablesÚdll_librariesr*   )ÚselfÚverboseÚdry_runÚforceÚstatusÚdetailsÚshared_options          r)   rB   zCygwinCCompiler.__init__n   sÈ  € ä×Ñ˜t W¨g°uÔ=ä(Ó*‰ˆ�Ø×ÒÚ ¢'ð+ô 	,àœÑ$Ø�I‰IðOð ñôô —*‘*—.‘.  uÓ-ˆŒÜ—:‘:—>‘> %¨Ó/ˆŒà�T—W‘WÑä“ñ DˆDÔ˜dœo¨tÔ/Cà×Ñ˜T×/Ò/Ø"×.Ó.Ø"Ÿo›oØ"×2Ó2ð34ñ 4ô 6ð �‰ )Ò+Ø"&§'¡'�•à"+�”ð �‰ &Ò(Ø )‘à /‘à"Ÿg™gˆDŒOØ%ˆMà×ÑÐ&<¸t¿w¹wÑ&FØ)EÈÏÉÑ)OØ*@À4Ç8Á8Ñ*KØ(5¸¿¹Ñ(?à)-¯«¹-ð)Ið	 	ô 	Kð �T—W‘WÑ ×!1Ñ!1°YÒ!>ð !)˜zˆDÔØ�I‰IØ>õ@ô
 "+£ˆDÕr+   c                 ó  — |dk(  s|dk(  r	 | j                  dd|d|g«       y	 | j                  | j                  |z   |d|gz   |z   «       y# t        $ r}t        |«      ‚d}~ww xY w# t        $ r}t        |«      ‚d}~ww xY w)z:Compiles the source by spawning GCC and windres if needed.ú.rcú.resÚwindresz-iz-oN)Úspawnr   r
   r<   )rT   ÚobjÚsrcÚextÚcc_argsÚextra_postargsÚpp_optsÚmsgs           r)   Ú_compilezCygwinCCompiler._compile®   s–   € à�%Š<˜3 &š=ð(Ø—
‘
˜I t¨S°$¸Ð<Õ=ð(Ø—
‘
˜4×+Ñ+¨gÑ5¸¸dÀCÐ8HÑHØ)ñ*õ +øô	 &ò (Ü" 3Ó'Ð'ûð(ûô &ò (Ü" 3Ó'Ð'ûð(ús.   ŒA ¤'A( Á	A%ÁA Á A%Á(	BÁ1A<Á<BNc                 ó  — t        j                   |
xs g «      }
t        j                   |xs g «      }t        j                   |xs g «      }|j                  | j                  «       |��h|| j                  k7  s| j                  dk(  �rIt
        j                  j                  |d   «      }t
        j                  j                  t
        j                  j                  |«      «      \  }}t
        j                  j                  ||dz   «      }t
        j                  j                  |d|z   dz   «      }dt
        j                  j                  |«      z  dg}|D ]  }|j                  |«       Œ | j                  t        ||fd	|z  «       | j                  d
k(  r'|
j                  d|g«       |
j                  d|g«       n|j                  |«       |	s|
j                  d«       t        j                  | |||||||d|	|
|||«       y)zLink the objects.Nr3   r   z.defÚlibr/   z
LIBRARY %sÚEXPORTSz
writing %sr6   z--output-libz--defz-s)ÚcopyÚextendrS   Ú
EXECUTABLErQ   rG   ÚpathÚdirnameÚsplitextÚbasenameÚjoinÚappendÚexecuter   r   Úlink)rT   Útarget_descÚobjectsÚoutput_filenameÚ
output_dirÚ	librariesÚlibrary_dirsÚruntime_library_dirsÚexport_symbolsÚdebugÚextra_preargsrd   Ú
build_tempÚtarget_langÚtemp_dirÚdll_nameÚdll_extensionÚdef_fileÚlib_fileÚcontentsÚsyms                        r)   ru   zCygwinCCompiler.link½   sÍ  € ô Ÿ	™	 -Ò"5°2Ó6ˆÜ—I‘I˜išo¨2Ó.ˆ	Ü—)‘)˜GšM rÓ*ˆð 	×Ñ˜×+Ñ+Ô,ð Ñ'Ø˜DŸO™OÒ+¨t¯©À%Ó/Gô —w‘w—‘ w¨q¡zÓ2ˆHä(*¯©×(8Ñ(8Ü—‘× Ñ  Ó1ó)3Ñ%ˆX�}ô —w‘w—|‘| H¨h¸Ñ.?Ó@ˆHÜ—w‘w—|‘| H¨e°hÑ.>ÀÑ.EÓFˆHð œrŸw™w×/Ñ/°Ó@Ñ@ØðˆHð &ò %�Ø—‘ Õ$ð%à�L‰Lœ h°Ð%9Ø%¨Ñ0ô2ð �‰ )Ò+Ø×$Ñ$ n°hÐ%?Ô@à×$Ñ$ g¨xÐ%8Õ9ð —‘˜xÔ(ñ Ø× Ñ  Ô&ä×Ñ˜4 ¨g°Ø% y°,Ø/ØØ  -°ÀØ&õ	(r+   c                 ó.  — |€d}g }|D �]  }t         j                  j                  t         j                  j                  |«      «      \  }}|| j                  ddgz   vrt        d|›d|›d�«      ‚|rt         j                  j                  |«      }|dv r@|j                  t         j                  j                  |||z   | j                  z   «      «       ŒÍ|j                  t         j                  j                  ||| j                  z   «      «       �Œ |S )z#Adds supports for rc and res files.Ú r\   r]   zunknown file type 'z	' (from 'z'))r]   r\   )
rG   rn   rp   ÚnormcaseÚsrc_extensionsr   rq   rs   rr   Úobj_extension)rT   Úsource_filenamesÚ	strip_dirry   Ú	obj_namesÚsrc_nameÚbaserb   s           r)   Úobject_filenamesz CygwinCCompiler.object_filenames  s  € àÐØˆJØˆ	Ø(ó 	KˆHäŸ™×(Ñ(¬¯©×)9Ñ)9¸(Ó)CÓD‰IˆD�#Ø˜4×.Ñ.°%¸°Ñ?Ñ@Ý&ÚšHð(&ó 'ð 'áÜ—w‘w×'Ñ'¨Ó.�Ø�oÑ%à× Ñ ¤"§'¡'§,¡,¨zØ.2°S©j¸4×;MÑ;MÑ.Mó#Oõ Pð × Ñ ¤"§'¡'§,¡,¨zØ/3°d×6HÑ6HÑ/Hó#Jö Kð	Kð Ðr+   ©r   r   r   )
NNNNNr   NNNN)r   rŠ   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__rP   r�   Ústatic_lib_extensionÚshared_lib_extensionÚstatic_lib_formatÚshared_lib_formatÚexe_extensionrB   rg   ru   r“   © r+   r)   r-   r-   c   sU   „ ñà€MØ€MØÐØ!ÐØ!ÐØÐØ€Mó>-ò@(ð FJØEIØ9=Ø?CóJ(ô\r+   r-   c                   ó   — e Zd ZdZdZdd„Zy)ÚMingw32CCompilerz@ Handles the Mingw32 port of the GNU C compiler to Windows.
    Úmingw32c                 óà  — t         j                  | |||«       d| j                  v r| j                  dk  rd}nd}d| j                  v r| j                  dk  rd}nd}t        | j                  «      rt        d«      ‚| j                  d	| j                  z  d
| j                  z  d	| j                  z  d| j                  z  | j                  ›d|›d|›�¬«       g | _
        t        «       | _
        y )Nr3   r7   r9   r8   r@   z--entry _DllMain@12rŠ   z1Cygwin gcc cannot be used with --compiler=mingw32z%s -O -Wallz%s -mdll -O -Wallz%sú r:   )r-   rB   rJ   rN   rM   Úis_cygwinccr	   rR   rK   rQ   rS   r*   )rT   rU   rV   rW   rZ   Úentry_points         r)   rB   zMingw32CCompiler.__init__'  sæ   € ä× Ñ  $¨°¸%Ô@ð �T—W‘WÑ §¡°6Ò!9Ø+‰Mà%ˆMð �T—W‘WÑ ×!1Ñ!1°YÒ!>Ø/‰KàˆKä�t—w‘wÔÜ ØCóEð Eð 	×Ñ m°d·g±gÑ&=Ø)<¸t¿w¹wÑ)FØ*7¸$¿(¹(Ñ*BØ(,¨t¯w©w©à+/¯?«?ºMÙ+6ð(8ð	 	ô 	9ð ˆÔô '›[ˆÕr+   Nr”   )r•   r–   r—   r˜   rP   rB   rž   r+   r)   r    r    "  s   „ ñà€Mô&)r+   r    Úokznot okÚ	uncertainc                  óÆ  — ddl m}  dt        j                  v rt        dfS dt        j                  v rt        dfS | j                  «       }	 t        |«      }	 d|j                  «       v rt        d|z  f|j                  «        S t        d	|z  f|j                  «        S # |j                  «        w xY w# t        $ r"}t        d
|›d|j                  ›�fcY d}~S d}~ww xY w)aw  Check if the current Python installation appears amenable to building
    extensions with GCC.

    Returns a tuple (status, details), where 'status' is one of the following
    constants:

    - CONFIG_H_OK: all is well, go ahead and compile
    - CONFIG_H_NOTOK: doesn't look good
    - CONFIG_H_UNCERTAIN: not sure -- unable to read pyconfig.h

    'details' is a human-readable string explaining the situation.

    Note there are two ways to conclude "OK": either 'sys.version' contains
    the string "GCC" (implying that this Python was built with GCC), or the
    installed "pyconfig.h" contains the string "__GNUC__".
    r   )Ú	sysconfigÚGCCzsys.version mentions 'GCC'ÚClangzsys.version mentions 'Clang'Ú__GNUC__z'%s' mentions '__GNUC__'z '%s' does not mention '__GNUC__'zcouldn't read 'z': N)Ú	distutilsr©   r"   r#   rE   Úget_config_h_filenameÚopenÚreadÚcloseÚCONFIG_H_NOTOKÚOSErrorÚCONFIG_H_UNCERTAINÚstrerror)r©   ÚfnÚconfig_hÚexcs       r)   rC   rC   W  sÓ   € õ* $ð ”—‘ÑÜÐ8Ð8Ð8ð ”#—+‘+ÑÜÐ:Ð:Ð:ð 
×	(Ñ	(Ó	*€Bð?Ü˜“8ˆð	Ø˜XŸ]™]›_Ñ,Ü"Ð$>ÀÑ$CÐCð �N‰NÕô &Ð'IÈBÑ'NÐNà�N‰NÕøˆH�N‰NÕûÜò ?Ý"Ú,.°·²Ð=ð?õ 	?ûð?úsB   ÁB5 ÁB  Á4B5 Â
B  ÂB5 Â B2Â2B5 Â5	C Â>CÃC ÃC s   (\d+\.\d+(\.\d+)*)c                 óÐ  — | j                  «       d   }t        |«      €yt        | dt        ¬«      j                  }	 |j                  «       }|j                  «        t        j                  |«      }|€y|j                  d«      j                  «       }t        j                  j                  «       5  t        |«      cddd«       S # |j                  «        w xY w# 1 sw Y   yxY w)z¤Find the version of an executable by running `cmd` in the shell.

    If the command is not found, or the output does not match
    `RE_VERSION`, returns None.
    r   NT)ÚshellÚstdouté   )Úsplitr   r   r   r»   r°   r±   Ú
RE_VERSIONÚsearchÚgroupÚdecoder­   r#   Úsuppress_known_deprecationr   )ÚcmdÚ
executableÚoutÚ
out_stringÚresultÚver_strs         r)   Ú_find_exe_versionrÉ   ˆ  s½   € ð —‘“˜Q‘€JÜ�zÓ"Ð*ØÜ
�˜4¬Ô
-×
4Ñ
4€CðØ—X‘X“Zˆ
à�	‰	ŒÜ×Ñ˜zÓ*€FØ€~Øà�l‰l˜1‹o×$Ñ$Ó&€GÜ	×	Ñ	×	5Ñ	5Ó	7ñ %Ü˜GÓ$÷%ñ %øð 	�	‰	�ú÷%ð %ús   ½C Â2CÃCÃC%c                  óX   — g d¢} t        | D �cg c]  }t        |«      ‘Œ c}«      S c c}w )zg Try to find out the versions of gcc, ld and dllwrap.

    If not possible it returns None for it.
    )zgcc -dumpversionzld -vzdllwrap --version)ÚtuplerÉ   )ÚcommandsrÃ   s     r)   rL   rL   ž  s)   € ò
 B€HÜ°HÖ=¨SÔ# CÕ(Ò=Ó>Ð>ùÒ=s   Ž'c                 óZ   — t        | dg«      }|j                  «       j                  d«      S )zCTry to determine if the compiler that would be used is from cygwin.z-dumpmachines   cygwin)r   ÚstripÚendswith)rJ   rÆ   s     r)   r¤   r¤   ¦  s+   € ä˜r >Ð2Ó3€JØ×ÑÓ×&Ñ& yÓ1Ð1r+   )#r˜   rG   r"   rk   Ú
subprocessr   r   r   ÚreÚdistutils.versionr­   Údistutils.unixccompilerr   Údistutils.file_utilr   Údistutils.errorsr   r	   r
   r   r   Údistutils.spawnr   r*   r-   r    rE   r²   r´   rC   Úcompiler¾   rÉ   rL   r¤   rž   r+   r)   ú<module>rØ      s•   ðñób 
Û 
Û ß 0Ñ 0Û 	ã Ý 1Ý *÷(ó (å *Ý +ò JôF|�mô |ô~+)�ô +)ðb €Ø€Ø Ð ò-?ð^ ˆR�Z‰ZÐ.Ó/€
ò%ò,?ó2r+   