§
    LöÉgù0  ã                   óÜ   — 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m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mZ d„ Zd	Z G d
„ de	¦  «        Z G d„ de¦  «        ZdZdZdZd„ Zd„ ZdZdS )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)Úcheck_output)ÚUnixCCompiler)Ú
write_file)ÚDistutilsExecErrorÚDistutilsPlatformErrorÚCCompilerErrorÚCompileError)ÚLooseVersionÚsuppress_known_deprecationc                  óh  — t           j                             d¦  «        } | dk    rŒt           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n nddgS t	          d|z  ¦  «        ‚dS )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     úq/var/www/html/nodeJS/PythonScripts/venv3.11/lib/python3.11/site-packages/setuptools/_distutils/cygwinccompiler.pyÚ	get_msvcrr(      s  € õ Œk×Ò˜xÑ(Ô(€GØ�"‚}€}Ý”+˜g¨™k¨G°b©LÐ8Ô9ˆØ�fÒÐà�;ÐØ˜ÒÐà�;ÐØ˜ÒÐà�;ÐØ˜ÒÐà�;ÐØ˜ÒÐà�<ÐØ˜ÒÐà�<ÐØ˜ÒÐà�<ÐØ•S˜‘\”\Ð(Ð(Ò(Ð( DÒ(Ð(Ð(Ð(Ð(à˜NÐ+Ð+åÐ>ÀÑHÑIÔIÐIð7 €}ó    zxUnable to set runtime library search path on Windows, usually indicated by `runtime_library_dirs` parameter to Extensionc                   óª   ‡ — e Zd ZdZdZdZdZdZdZdZ	dZ
dZd	Zdˆ fd„	Zed„ ¦   «         Zd„ Z	 	 	 	 	 	 	 	 	 	 dd„Zd„ Zˆ fd„Zeˆ fd„¦   «         Zˆ xZS )ÚCygwinCCompilerz9Handles the Cygwin port of the GNU C compiler to Windows.Úcygwinz.oz.az.dll.az.dllzlib%s%szcyg%s%sz.exer   c           
      ó€  •— t          ¦   «                              |||¦  «         t          ¦   «         \  }}|                      d                     ||¦  «        ¦  «         |t
          ur|                      d|z  ¦  «         t          j         	                    dd¦  «        | _
        t          j         	                    dd¦  «        | _        | j
        | _        d}|                      d| j
        z  d	| j
        z  d| j        z  d
| j
        z  d                     | j        |¦  «        ¬¦  «         t          ¦   «         | _        d S )Nz%Python's GCC status: {} (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++ú-sharedz%s -mcygwin -O -Wallz%s -mcygwin -mdll -O -Wallz%s -mcygwinz{} -mcygwin {}©ÚcompilerÚcompiler_soÚcompiler_cxxÚ
linker_exeÚ	linker_so)ÚsuperÚ__init__Úcheck_config_hÚdebug_printÚformatÚCONFIG_H_OKÚwarnÚosÚenvironÚgetÚccÚcxxÚ
linker_dllÚset_executablesr(   Údll_libraries)ÚselfÚverboseÚdry_runÚforceÚstatusÚdetailsÚshared_optionÚ	__class__s          €r'   r9   zCygwinCCompiler.__init__Q   s7  ø€ å‰Œ×Ò˜ '¨5Ñ1Ô1Ð1å(Ñ*Ô*‰ˆ�Ø×ÒØ3×:Ò:¸6À7ÑKÔKñ	
ô 	
ð 	
ð �Ð$Ð$Ø�IŠIðOàQXñYñô ð õ ”*—.’.  uÑ-Ô-ˆŒÝ”:—>’> %¨Ñ/Ô/ˆŒàœ'ˆŒØ!ˆà×ÒØ+¨d¬gÑ5Ø4°t´wÑ>Ø/°$´(Ñ:Ø$ t¤wÑ.Ø'×.Ò.¨t¬ÀÑNÔNð 	ñ 	
ô 	
ð 	
õ '™[œ[ˆÔÐÐr)   c                 ó¨   — t          j        dt          d¬¦  «         t          ¦   «         5  t	          d¦  «        cd d d ¦  «         S # 1 swxY w Y   d S )Nz�gcc_version attribute of CygwinCCompiler is deprecated. Instead of returning actual gcc version a fixed value 11.2.0 is returned.é   )Ú
stacklevelz11.2.0)Úwarningsr>   ÚDeprecationWarningr   r
   )rG   s    r'   Úgcc_versionzCygwinCCompiler.gcc_versionr   s¦   € õ 	ŒðXåØð		
ñ 	
ô 	
ð 	
õ (Ñ)Ô)ð 	*ð 	*Ý Ñ)Ô)ð	*ð 	*ð 	*ð 	*ñ 	*ô 	*ð 	*ð 	*ð 	*ð 	*ð 	*ð 	*øøøð 	*ð 	*ð 	*ð 	*ð 	*ð 	*s   «AÁAÁAc                 ó*  — |dk    s|dk    r>	 |                       dd|d|g¦  «         dS # t          $ r}t          |¦  «        ‚d}~ww xY w	 |                       | j        |z   |d|gz   |z   ¦  «         dS # 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	   r4   )rG   ÚobjÚsrcÚextÚcc_argsÚextra_postargsÚpp_optsÚmsgs           r'   Ú_compilezCygwinCCompiler._compile�   sØ   € à�%Š<ˆ<˜3 &š=˜=ð(Ø—
’
˜I t¨S°$¸Ð<Ñ=Ô=Ð=Ð=Ð=øÝ%ð (ð (ð (Ý" 3Ñ'Ô'Ð'øøøøð(øøøð(Ø—
’
ØÔ$ wÑ.°#°t¸SÐ1AÑAÀNÑRñô ð ð ð øõ &ð (ð (ð (Ý" 3Ñ'Ô'Ð'øøøøð(øøøs,   Ž* ª
A´AÁAÁ&A4 Á4
BÁ>BÂBNc                 óŽ  — t          j         |
pg ¦  «        }
t          j         |pg ¦  «        }t          j         |pg ¦  «        }|r|                      t          ¦  «         |                     | j        ¦  «         |��|| j        k    s| j        dk    rût          j         	                    |d         ¦  «        }t          j         
                    t          j                             |¦  «        ¦  «        \  }}t          j                             ||dz   ¦  «        }dt          j                             |¦  «        z  dg}|D ]}|                     |¦  «         Œ|                      t          ||fd|z  ¦  «         |                     |¦  «         |	s|
                     d¦  «         t!          j        | |||||||d|	|
|||¦  «         dS )	zLink the objects.Nr/   r   z.defz
LIBRARY %sÚEXPORTSz
writing %sz-s)Úcopyr>   Ú_runtime_library_dirs_msgÚextendrF   Ú
EXECUTABLErD   r?   ÚpathÚdirnameÚsplitextÚbasenameÚjoinÚappendÚexecuter   r   Úlink)rG   Útarget_descÚobjectsÚoutput_filenameÚ
output_dirÚ	librariesÚlibrary_dirsÚruntime_library_dirsÚexport_symbolsÚdebugÚextra_preargsr^   Ú
build_tempÚtarget_langÚtemp_dirÚdll_nameÚdll_extensionÚdef_fileÚcontentsÚsyms                       r'   ro   zCygwinCCompiler.link‘   s×  € õ$ œ	 -Ð"5°2Ñ6Ô6ˆÝ”I˜i˜o¨2Ñ.Ô.ˆ	Ý”)˜G˜M rÑ*Ô*ˆàð 	1Ø�IŠIÕ/Ñ0Ô0Ð0ð 	×Ò˜Ô+Ñ,Ô,Ð,ð Ñ&Ø˜4œ?Ò*Ð*¨d¬oÀÒ.FÐ.Fõ ”w—’ w¨q¤zÑ2Ô2ˆHå(*¬×(8Ò(8Ý”× Ò  Ñ1Ô1ñ)ô )Ñ%ˆX�}õ
 ”w—|’| H¨h¸Ñ.?Ñ@Ô@ˆHð %¥r¤w×'7Ò'7¸Ñ'HÔ'HÑHÈ)ÐTˆHØ%ð %ð %�Ø—’ Ñ$Ô$Ð$Ð$Ø�LŠL� h°Ð%9¸<È(Ñ;RÑSÔSÐSð
 �NŠN˜8Ñ$Ô$Ð$ð ð 	'Ø× Ò  Ñ&Ô&Ð&åÔØØØØØØØØ ØØØØØØñ	
ô 	
ð 	
ð 	
ð 	
r)   c                 ó:   — |                       t          ¦  «         g S ©N)r>   re   ©rG   Údirs     r'   Úruntime_library_dir_optionz*CygwinCCompiler.runtime_library_dir_optionë   s   € ð 	�	Š	Õ+Ñ,Ô,Ð,Øˆ	r)   c                 óˆ   •— t           j                             |¦  «        }t          ¦   «                              |||¦  «        S rƒ   )r?   rh   Únormcaser8   Ú_make_out_path)rG   rs   Ú	strip_dirÚsrc_nameÚnorm_src_namerN   s        €r'   r‰   zCygwinCCompiler._make_out_pathô   s4   ø€ åœ×(Ò(¨Ñ2Ô2ˆÝ‰wŒw×%Ò% j°)¸]ÑKÔKÐKr)   c                 óL   •‡ — i t          ¦   «         j        ¥ˆ fd„dD ¦   «         ¥S )z3
        Add support for rc and res files.
        c                 ó&   •— i | ]}||‰j         z   “ŒS © )Úobj_extension)Ú.0r\   rG   s     €r'   ú
<dictcomp>z2CygwinCCompiler.out_extensions.<locals>.<dictcomp>   s#   ø€ ÐHÐHÐH°ˆs�C˜$Ô,Ñ,ÐHÐHÐHr)   )rW   rV   )r8   Úout_extensions)rG   rN   s   `€r'   r“   zCygwinCCompiler.out_extensionsù   s9   øø€ ð

Ý‰gŒgÔ$ð
àHÐHÐHÐH¸ÐHÑHÔHð
ð 	
r)   ©r   r   r   )
NNNNNr   NNNN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Úcompiler_typer�   Ústatic_lib_extensionÚshared_lib_extensionÚdylib_lib_extensionÚstatic_lib_formatÚshared_lib_formatÚdylib_lib_formatÚexe_extensionr9   ÚpropertyrT   ra   ro   r†   r‰   r“   Ú__classcell__©rN   s   @r'   r+   r+   D   s,  ø€ € € € € ØCÐCà€MØ€MØÐØ#ÐØ ÐØ!ÐØ!ÐØ ÐØ€Mð)ð )ð )ð )ð )ð )ðB ð*ð *ñ „Xð*ð(ð (ð (ð* ØØØ!ØØØØØØðX
ð X
ð X
ð X
ðtð ð ðLð Lð Lð Lð Lð
 ð
ð 
ð 
ð 
ñ „Xð
ð 
ð 
ð 
ð 
r)   r+   c                   ó.   ‡ — e Zd ZdZdZdˆ fd„	Zd„ Zˆ xZS )ÚMingw32CCompilerz:Handles the Mingw32 port of the GNU C compiler to Windows.Úmingw32r   c           
      ór  •— t          ¦   «                              |||¦  «         d}t          | j        ¦  «        rt	          d¦  «        ‚|                      d| j        z  d| j        z  d| j        z  d| j        z  d                     | j        |¦  «        ¬¦  «         g | _	        t          ¦   «         | _	        d S )Nr1   z1Cygwin gcc cannot be used with --compiler=mingw32z%s -O -Wallz%s -mdll -O -Wallz%sz{} {}r2   )r8   r9   Úis_cygwinccrB   r   rE   rC   r<   rD   rF   r(   )rG   rH   rI   rJ   rM   rN   s        €r'   r9   zMingw32CCompiler.__init__
  s»   ø€ å‰Œ×Ò˜ '¨5Ñ1Ô1Ð1à!ˆå�t”wÑÔð 	VÝ Ð!TÑUÔUÐUà×ÒØ" T¤WÑ,Ø+¨d¬gÑ5Ø&¨¬Ñ1Ø˜dœg‘~Ø—n’n T¤_°mÑDÔDð 	ñ 	
ô 	
ð 	
ð  ˆÔõ '™[œ[ˆÔÐÐr)   c                 ó*   — t          t          ¦  «        ‚rƒ   )r   re   r„   s     r'   r†   z+Mingw32CCompiler.runtime_library_dir_option&  s   € Ý$Õ%>Ñ?Ô?Ð?r)   r”   )r•   r–   r—   r˜   r™   r9   r†   r¢   r£   s   @r'   r¥   r¥     s^   ø€ € € € € ØDÐDà€Mð)ð )ð )ð )ð )ð )ð8@ð @ð @ð @ð @ð @ð @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 |                      ¦   «         }	 t          |¦  «        }	 d|                     ¦   «         v r t          d|z  f|                     ¦   «          S t          d	|z  f|                     ¦   «          S # |                     ¦   «          w xY w# t          $ r,}t          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 '{}': {}N)Ú	distutilsr­   r    r!   r=   Úget_config_h_filenameÚopenÚreadÚcloseÚCONFIG_H_NOTOKÚOSErrorÚCONFIG_H_UNCERTAINr<   Ústrerror)r­   ÚfnÚconfig_hÚexcs       r'   r:   r:   3  s4  € ð* $Ð#Ð#Ð#Ð#Ð#ð •”ÐÐÝÐ8Ð8Ð8ð •#”+ÐÐÝÐ:Ð:Ð:ð 
×	(Ò	(Ñ	*Ô	*€Bð
WÝ˜‘8”8ˆð	Ø˜XŸ]š]™_œ_Ð,Ð,Ý"Ð$>ÀÑ$CÐCð �NŠNÑÔÐÐõ &Ð'IÈBÑ'NÐNà�NŠNÑÔÐÐøˆH�NŠNÑÔÐÐøøøøÝð Wð Wð WÝ"Ð$<×$CÒ$CÀBÈÌÑ$UÔ$UÐVÐVÐVÐVÐVÐVÐVøøøøðWøøøsB   Á
C	 Á!B0 Á;C	 ÂB0 ÂC	 Â0CÃC	 Ã	
C?Ã!C:Ã4C?Ã:C?c                 óš   — t          t          j        | ¦  «        dgz   ¦  «        }|                     ¦   «                              d¦  «        S )zCTry to determine if the compiler that would be used is from cygwin.z-dumpmachines   cygwin)r   ÚshlexÚsplitÚstripÚendswith)rB   Ú
out_strings     r'   r¨   r¨   b  s?   € å�eœk¨"™oœo°Ð0@Ñ@ÑAÔA€JØ×ÒÑÔ×&Ò& yÑ1Ô1Ð1r)   )r˜   r?   r    rd   r¾   rR   Ú
subprocessr   Údistutils.unixccompilerr   Údistutils.file_utilr   Údistutils.errorsr   r   r   r	   Údistutils.versionr
   r   r(   re   r+   r¥   r=   r¶   r¸   r:   r¨   Úget_versionsr�   r)   r'   ú<module>rÉ      s”  ððð ð 
€	€	€	Ø 
€
€
€
Ø €€€Ø €€€Ø €€€Ø #Ð #Ð #Ð #Ð #Ð #à 1Ð 1Ð 1Ð 1Ð 1Ð 1Ø *Ð *Ð *Ð *Ð *Ð *ðð ð ð ð ð ð ð ð ð ð ð ð GÐ FÐ FÐ FÐ FÐ FÐ FÐ Fð Jð  Jð  JðHIð ð}
ð }
ð }
ð }
ð }
�mñ }
ô }
ð }
ðB"@ð "@ð "@ð "@ð "@�ñ "@ô "@ð "@ðR €Ø€Ø Ð ð,Wð ,Wð ,Wð^2ð 2ð 2ð €ðð r)   