ó
    µ'Ô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Jr  SSK	J
r
Jr  SSKJr  SSKJr  SSKJrJr  S	S
KJr  S	SK	JrJr  S rSr " S S\R2                  5      r " S S\5      rSrSrSrS rS rSr g)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é   )ÚDistutilsExecErrorÚDistutilsPlatformError)Ú
write_file)Úget_config_vars)ÚLooseVersionÚsuppress_known_deprecationé   )Úunix)ÚCompileErrorÚErrorc                  ó   • / $ )z6No longer needed, but kept for backward compatibility.© r   ó    Úg/var/www/surfInsights/venv3-11/lib/python3.13/site-packages/setuptools/_distutils/compilers/C/cygwin.pyÚ	get_msvcrr      s   € à€Ir   zxUnable to set runtime library search path on Windows, usually indicated by `runtime_library_dirs` parameter to Extensionc                   ó¶   ^ • \ rS rSrSrSrSrSrSrSr	Sr
SrS	rS
rSU 4S jjr\S 5       rS r          SU 4S jjrS rU 4S jr\U 4S j5       rSrU =r$ )ÚCompileré*   z9Handles the Cygwin port of the GNU C compiler to Windows.Úcygwinz.oz.az.dll.az.dllzlib%s%szcyg%s%sz.exec                 ó   >• [         TU ]  XS9  [        5       u  p4U R                  SU SU S35        U[        La  U R                  SU S35        [        SS5      u  U l        U l        [        R                  R                  SU R                  =(       d    S	5      U l        [        R                  R                  SU R                  =(       d    S
5      U l        U R                  U l        U R                  U l        SnU R                  U R                   S3U R                   S3U R                   S3U R                   S3U R                   S3U R                   SU 3U R                   S3U R                   SU 3S9  [        5       U l        g )N)ÚforcezPython's GCC status: z (details: Ú)zCPython's pyconfig.h doesn't seem to support your compiler. Reason: z>. Compiling may fail because of undefined preprocessor macros.ÚCCÚCXXÚgcczg++ú-sharedz -mcygwin -O -Wallz -mcygwin -mdll -O -Wallz	 -mcygwinz
 -mcygwin )ÚcompilerÚcompiler_soÚcompiler_cxxÚcompiler_so_cxxÚ
linker_exeÚ	linker_soÚlinker_exe_cxxÚlinker_so_cxx)ÚsuperÚ__init__Úcheck_config_hÚdebug_printÚCONFIG_H_OKÚwarnr   ÚccÚcxxÚosÚenvironÚgetÚ
linker_dllÚlinker_dll_cxxÚset_executablesr   Údll_libraries)ÚselfÚverboser   ÚstatusÚdetailsÚshared_optionÚ	__class__s         €r   r(   ÚCompiler.__init__7   sw  ø€ Ü‰Ñ˜ÐÑ.ä(Ó*‰ˆØ×ÑÐ0°°¸ÀGÀ9ÈAÐNÔOØœÒ$Ø�I‰IðØ"˜)ð $OðOôô ,¨D°%Ó8ÑˆŒ�”ô —*‘*—.‘.  t§w¡w×'7°%Ó8ˆŒÜ—:‘:—>‘> %¨¯©×):°UÓ;ˆŒàŸ'™'ˆŒØ"Ÿh™hˆÔØ!ˆà×ÑØŸ™�yÐ 2Ð3ØŸ7™7˜)Ð#;Ð<Ø ŸH™H˜:Ð%7Ð8Ø#Ÿx™x˜jÐ(@ÐAØŸ'™'˜ )Ð,ØŸ™Ð)¨°M°?ÐCØ"Ÿh™h˜Z yÐ1Ø!×0Ñ0Ð1°¸M¸?ÐKð 	ñ 		
ô '›[ˆÕr   c                 ó–   • [         R                  " S[        SS9  [        5          [	        S5      sS S S 5        $ ! , (       d  f       g = f)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	   )r6   s    r   Úgcc_versionÚCompiler.gcc_version[   s8   € ô 	�ŠðXäØò		
ô (Õ)Ü Ó)÷ *×)×)ús	   ¥:º
Ac                 ó~  • US;   a   U R                  SSUSU/5        g U R                  U5      S:X  a(  U R                  U R                  U-   USU/-   U-   5        gU R                  U R
                  U-   USU/-   U-   5        g! [         a  n[        U5      eSnAff = f! [         a  n[        U5      eSnAff = f)z:Compiles the source by spawning GCC and windres if needed.)ú.rcú.resÚwindresz-iz-oNzc++)Úspawnr   r   Údetect_languager"   r    )r6   ÚobjÚsrcÚextÚcc_argsÚextra_postargsÚpp_optsÚmsgs           r   Ú_compileÚCompiler._compilej   sÚ   € à�/Ó!ð(Ø—
‘
˜I t¨S°$¸Ð<Õ=ð(Ø×'Ñ'¨Ó,°Ó5Ø—J‘JØ×,Ñ,Ø!ñ"à  cÐ*ñ+ð )ñ)õð —J‘JØ×(Ñ(¨7Ñ2°c¸4ÀÐ5EÑEÈÑVõøô &ó (Ü" 3Ó'Ð'ûð(ûô &ó (Ü" 3Ó'Ð'ûð(ús4   ˆB  <B" Á'B" Â
BÂBÂBÂ"
B<Â,B7Â7B<c                 ó¤  >• [         R                   " U
=(       d    / 5      n
[         R                   " U=(       d    / 5      n[         R                   " U=(       d    / 5      nU(       a  U R                  [        5        UR                  U R                  5        UGb  XR
                  :w  d  U R                  S:X  aå  [        R                  R                  US   5      n[        R                  R                  [        R                  R                  U5      5      u  nn[        R                  R                  XïS-   5      nS[        R                  R                  U5       3S/nUR                  U5        U R                  [        UU4SU 35        UR                  U5        U	(       d  U
R                  S5        [         TU ]E  UUUUUUUSU	U
UUU5        g)	zLink the objects.Nr   r   z.defzLIBRARY ÚEXPORTSzwriting z-s)Úcopyr,   Ú_runtime_library_dirs_msgÚextendr5   Ú
EXECUTABLEr2   r/   ÚpathÚdirnameÚsplitextÚbasenameÚjoinÚexecuter   Úappendr'   Úlink)r6   Útarget_descÚobjectsÚoutput_filenameÚ
output_dirÚ	librariesÚlibrary_dirsÚruntime_library_dirsÚexport_symbolsÚdebugÚextra_preargsrN   Ú
build_tempÚtarget_langÚtemp_dirÚdll_nameÚdll_extensionÚdef_fileÚcontentsr;   s                      €r   r`   ÚCompiler.link‚   sz  ø€ ô$ Ÿ	š	 -×"5°2Ó6ˆÜ—I’I˜iŸo¨2Ó.ˆ	Ü—)’)˜GŸM rÓ*ˆæØ�I‰IÔ/Ô0ð 	×Ñ˜×+Ñ+Ô,ð Ò&ØŸ?™?Ó*¨d¯o©oÀÓ.Fô —w‘w—‘ w¨q¡zÓ2ˆHä(*¯©×(8Ñ(8Ü—‘× Ñ  Ó1ó)Ñ%ˆX�}ô
 —w‘w—|‘| H¸Ñ.?Ó@ˆHð #¤2§7¡7×#3Ñ#3°OÓ#DÐ"EÐFÈ	ÐRˆHØ�O‰O˜NÔ+Ø�L‰Lœ h°Ð%9¸XÀhÀZÐ;PÔQð
 �N‰N˜8Ô$ö Ø× Ñ  Ô&ä‰‰ØØØØØØØ ØØØØØØõ	
r   c                 ó0   • U R                  [        5        / $ ©N)r,   rV   ©r6   Údirs     r   Úruntime_library_dir_optionÚ#Compiler.runtime_library_dir_optionÚ   s   € ð 	�	‰	Ô+Ô,Øˆ	r   c                 ób   >• [         R                  R                  U5      n[        TU ]  XU5      $ rt   )r/   rY   Únormcaser'   Ú_make_out_path)r6   rd   Ú	strip_dirÚsrc_nameÚnorm_src_namer;   s        €r   r{   ÚCompiler._make_out_pathã   s)   ø€ äŸ™×(Ñ(¨Ó2ˆÜ‰wÑ% j¸]ÓKÐKr   c                 ód   >• 0 [         TU ]  ES Vs0 s H  oXR                  -   _M     snE$ s  snf )z#
Add support for rc and res files.
)rF   rE   )r'   Úout_extensionsÚobj_extension)r6   rL   r;   s     €r   r�   ÚCompiler.out_extensionsè   s@   ø€ ð

Ü‰gÑ$ð
á8GÓHº°�C×,Ñ,Ñ,Ò,¹ÑHð
ð 	
ùâHs   ‘-)r-   r.   r5   r2   r3   ©FF)
NNNNNFNNNN)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Úcompiler_typer‚   Ústatic_lib_extensionÚshared_lib_extensionÚdylib_lib_extensionÚstatic_lib_formatÚshared_lib_formatÚdylib_lib_formatÚexe_extensionr(   ÚpropertyrB   rQ   r`   rw   r{   r�   Ú__static_attributes__Ú__classcell__©r;   s   @r   r   r   *   sž   ø† ÙCà€MØ€MØÐØ#ÐØ ÐØ!ÐØ!ÐØ ÐØ€M÷")ðH ñ*ó ð*ò(ð: ØØØ!ØØØØØØ÷V
òpõLð
 ô
ó ö
r   r   c                   ó:   ^ • \ rS rSrSrSrSU 4S jjrS rSrU =r	$ )ÚMinGW32Compileréô   z:Handles the Mingw32 port of the GNU C compiler to Windows.Úmingw32c                 ón  >• [         TU ]  X5        Sn[        U R                  5      (       a  [	        S5      eU R                  U R                   S3U R                   S3U R                   S3U R                   S3U R                   U R                   SU 3U R                   U R                   SU 3S9  g )Nr   z1Cygwin gcc cannot be used with --compiler=mingw32z	 -O -Wallz -shared -O -WallÚ )r   r    r"   r!   r#   r$   r%   r&   )	r'   r(   Úis_cygwinccr-   r   r4   r.   r2   r3   )r6   r7   r   r:   r;   s       €r   r(   ÚMinGW32Compiler.__init__ù   s·   ø€ Ü‰Ñ˜Ô(à!ˆä�t—w‘w×ÑÜÐKÓLÐLà×ÑØŸ™�y 	Ð*ØŸ7™7˜)Ð#4Ð5Ø#Ÿx™x˜jÐ(9Ð:Ø ŸH™H˜: YÐ/ØŸ'™'˜ØŸ™Ð)¨¨=¨/Ð:Ø"Ÿh™h˜ZØ!×0Ñ0Ð1°°=°/ÐBð 	ò 		
r   c                 ó    • [        [        5      ert   )r   rV   ru   s     r   rw   Ú*MinGW32Compiler.runtime_library_dir_option  s   € Ü$Ô%>Ó?Ð?r   r   r„   )
r…   r†   r‡   rˆ   r‰   rŠ   r(   rw   r“   r”   r•   s   @r   r—   r—   ô   s   ø† ÙDà€M÷
÷&@ð @r   r—   Úokznot okÚ	uncertainc                  óŽ  • SSK Jn   S[        R                  ;   a  [        S4$ S[        R                  ;   a  [        S4$ U R                  5       n [        R                  " U5      R                  SS9nS	nX2;   a	  [        nS
nO[        nSnXA< SU SU< 34$ ! [         a"  n[        SU SUR                   34s SnA$ SnAff = f)aK  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'zutf-8)ÚencodingÚ__GNUC__Úmentionszdoes not mentionr›   zcouldn't read 'z': N)Ú	distutilsr£   ÚsysÚversionr+   Úget_config_h_filenameÚpathlibÚPathÚ	read_textÚCONFIG_H_NOTOKÚOSErrorÚCONFIG_H_UNCERTAINÚstrerror)r£   ÚfnÚconfig_hÚ	substringÚcodeÚmention_inflectedÚexcs          r   r)   r)     sÜ   € õ* $ð ”—‘ÓÜÐ8Ð8Ð8ð ”#—+‘+ÓÜÐ:Ð:Ð:ð 
×	(Ñ	(Ó	*€BðAÜ—<’< Ó#×-Ñ-°wÐ-Ð?ˆð ˆ	ØÓ ÜˆDØ *Ñä!ˆDØ 2ÐØ‘v˜QÐ0Ð1°°9±-Ð@Ð@Ð@øô ó MÜ" o°b°T¸¸S¿\¹\¸NÐ$KÐLÕLûðMús   Á#B Â
CÂ"B?Â9CÂ?Cc                 ó†   • [        [        R                  " U 5      S/-   5      nUR                  5       R	                  S5      $ )zCTry to determine if the compiler that would be used is from cygwin.z-dumpmachines   cygwin)r   ÚshlexÚsplitÚstripÚendswith)r-   Ú
out_strings     r   rœ   rœ   J  s6   € äœeŸkšk¨"›o°Ð0@Ñ@ÓA€JØ×ÑÓ×&Ñ& yÓ1Ð1r   )!r‰   rU   r/   r­   r»   rª   r@   Ú
subprocessr   Úerrorsr   r   Ú	file_utilr   r£   r   r«   r	   r
   Ú r   r   r   r   rV   r   r—   r+   r°   r²   r)   rœ   Úget_versionsr   r   r   Ú<module>rÅ      s•   ðñó Û 	Û Û Û 
Û Ý #÷õ $Ý (ß ?Ý ÷òðIð ôF
ˆt�}‰}ô F
ôT@�hô @ð@ €Ø€Ø Ð ò.Aòb2ð €ðr   