ó
    Lƒwjë/  ã                  ó  • S r SSKJ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Jr  SSKJr  SSKJr  S	S
KJr  S	SKJr  \" \5      rS rSr " S S\R8                  5      r " S S\5      rSrSrSr S r!SS j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).
é    )ÚannotationsN)Úget_config_varsé   )ÚErrorÚPlatformError)Ú
get_logger)Úis_mingwé   )Úunix)ÚCompileErrorc                 ó   • / $ )z6No longer needed, but kept for backward compatibility.© r   ó    Ú¶C:\Users\johnn\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\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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'Cygwin port of GNU C Compiler for Win32z.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 -O1 -Wallz -mcygwin -mdll -O1 -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__8   sw  ø€ Ü‰Ñ˜ÐÑ.ä(Ó*‰ˆØ×ÑÐ0°°¸ÀGÀ9ÈAÐNÔOØœÒ$Ø�I‰IðØ"˜)ð $OðOôô ,¨D°%Ó8ÑˆŒ�”ô —*‘*—.‘.  t§w¡w×'7°%Ó8ˆŒÜ—:‘:—>‘> %¨¯©×):°UÓ;ˆŒàŸ'™'ˆŒØ"Ÿh™hˆÔØ!ˆà×ÑØŸ™�yÐ 3Ð4ØŸ7™7˜)Ð#<Ð=Ø ŸH™H˜:Ð%8Ð9Ø#Ÿx™x˜jÐ(AÐBØŸ'™'˜ )Ð,ØŸ™Ð)¨°M°?ÐCØ"Ÿh™h˜Z yÐ1Ø!×0Ñ0Ð1°¸M¸?ÐKð 	ñ 		
ô '›[ˆÕr   c                ót   • [         R                  " S[        SS9  [        R                  R                  S5      $ )Nz�gcc_version attribute of CygwinCCompiler is deprecated. Instead of returning actual gcc version a fixed value 11.2.0 is returned.r   )Ú
stacklevelz11.2.0)Úwarningsr*   ÚDeprecationWarningÚ	packagingÚversionÚVersion)r4   s    r   Úgcc_versionÚCompiler.gcc_version\   s5   € ô 	�ŠðXäØò		
ô × Ñ ×(Ñ(¨Ó2Ð2r   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! [        R                  [        4 a  n[	        U5      eSnAff = f! [        R                  [        4 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++)ÚcallÚ
subprocessÚCalledProcessErrorÚOSErrorr   Údetect_languager    r   )r4   ÚobjÚsrcÚextÚcc_argsÚextra_postargsÚpp_optsÚmsgs           r   Ú_compileÚCompiler._compilej   sð   € à�/Ó!ð(Ø—	‘	˜9 d¨C°°sÐ;Õ<ð(Ø×'Ñ'¨Ó,°Ó5Ø—I‘IØ×,Ñ,Ø!ñ"à  cÐ*ñ+ð )ñ)õð —I‘IØ×(Ñ(¨7Ñ2°c¸4ÀÐ5EÑEÈÑVõøô ×1Ñ1´7Ð;ó (Ü" 3Ó'Ð'ûð(ûô ×1Ñ1´7Ð;ó (Ü" 3Ó'Ð'ûð(ús4   ˆB  <B2 Á'B2 ÂB/ÂB*Â*B/Â2CÃCÃC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b6  XR
                  :w  d  U R                  S:X  G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        [        R                  SU5        [        R                   " U5      R#                  SR                  U5      S-   5        UR%                  U5        U	(       d  U
R%                  S	5        [&        TU ]Q  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 %sÚ
z-s)Úcopyr*   Ú_runtime_library_dirs_msgÚextendr3   Ú
EXECUTABLEr0   r-   ÚpathÚdirnameÚsplitextÚbasenameÚjoinÚlogÚinfoÚpathlibÚPathÚ
write_textÚappendr%   Úlink)r4   Útarget_descÚobjectsÚoutput_filenameÚ
output_dirÚ	librariesÚlibrary_dirsÚruntime_library_dirsÚexport_symbolsÚdebugÚextra_preargsrQ   Ú
build_tempÚtarget_langÚtemp_dirÚdll_nameÚ_dll_extensionÚdef_fileÚcontentsr9   s                      €r   rh   ÚCompiler.link‚   s‘  ø€ ô$ Ÿ	š	 -×"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ä)+¯©×)9Ñ)9Ü—‘× Ñ  Ó1ó*Ñ&ˆX�~ô
 —w‘w—|‘| H¸Ñ.?Ó@ˆHð #¤2§7¡7×#3Ñ#3°OÓ#DÐ"EÐFÈ	ÐRˆHØ�O‰O˜NÔ+Ü�H‰H�\ 8Ô,Ü�LŠL˜Ó"×-Ñ-¨d¯i©i¸Ó.AÀDÑ.HÔIð
 �N‰N˜8Ô$ö Ø× Ñ  Ô&ä‰‰ØØØØØØØ ØØØØØØõ	
r   c                ó0   • U R                  [        5        / $ ©N)r*   rZ   ©r4   Ú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      $ r|   )r-   r]   Únormcaser%   Ú_make_out_path)r4   rl   Ú	strip_dirÚsrc_nameÚnorm_src_namer9   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)r4   rO   r9   s     €r   r‰   ÚCompiler.out_extensionsé   s@   ø€ ð

Ü‰gÑ$ð
á8GÓHº°�C×,Ñ,Ñ,Ò,¹ÑHð
ð 	
ùâHs   ‘-)r+   r,   r3   r0   r1   ©FF)
NNNNNFNNNN)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Úcompiler_typeÚdescriptionrŠ   Ústatic_lib_extensionÚshared_lib_extensionÚdylib_lib_extensionÚstatic_lib_formatÚshared_lib_formatÚdylib_lib_formatÚexe_extensionr&   ÚpropertyrB   rT   rh   r   rƒ   r‰   Ú__static_attributes__Ú__classcell__©r9   s   @r   r   r   *   s£   ø† ÙCà€MØ;€KØ€MØÐØ#ÐØ ÐØ!ÐØ!ÐØ ÐØ€M÷")ðH ñ3ó ð3ò(ð: ØØØ!ØØØØØØ÷W
òrõLð
 ô
ó ö
r   r   c                  óN   ^ • \ rS rSrSrSrSrS	U 4S jj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.Úmingw32z(Mingw32 port of GNU C Compiler for Win32c                ó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
 -O1 -Wallz -shared -O1 -WallÚ )r   r   r    r   r!   r"   r#   r$   )	r%   r&   Úis_cygwinccr+   r   r2   r,   r0   r1   )r4   r5   r   r8   r9   s       €r   r&   ÚMinGW32Compiler.__init__û   s·   ø€ Ü‰Ñ˜Ô(à!ˆä�t—w‘w×ÑÜÐKÓLÐLà×ÑØŸ™�y 
Ð+ØŸ7™7˜)Ð#5Ð6Ø#Ÿx™x˜jÐ(:Ð;Ø ŸH™H˜: ZÐ0ØŸ'™'˜ØŸ™Ð)¨¨=¨/Ð:Ø"Ÿh™h˜ZØ!×0Ñ0Ð1°°=°/ÐBð 	ò 		
r   c                óB   >• [        5       (       a  [        TU ]	  5         g g r|   )r	   r%   Úconfigure_system)r4   r9   s    €r   r¨   Ú MinGW32Compiler.configure_system  s   ø€ ô �:‰:Ü‰GÑ$Õ&ð r   c                ó    • [        [        5      er|   )r   rZ   r}   s     r   r   Ú*MinGW32Compiler.runtime_library_dir_option  s   € ÜÔ5Ó6Ð6r   r   rŒ   )ÚreturnÚNone)r�   rŽ   r�   r�   r‘   r’   r“   r&   r¨   r   rœ   r�   rž   s   @r   r    r    õ   s$   ø† ÙDà€MØ<€K÷
÷&'÷7ð 7r   r    Úokznot okÚ	uncertainc                 óŠ  • SSK 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   NÚGCCzsys.version mentions 'GCC'ÚClangzsys.version mentions 'Clang'zutf-8)ÚencodingÚ__GNUC__Úmentionszdoes not mentionr¤   zcouldn't read 'z': )Ú	sysconfigÚsysr@   r)   Úget_config_h_filenamerd   re   Ú	read_textÚCONFIG_H_NOTOKrK   Ú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=Â7CÂ=Cc                óœ   • [         R                  " [        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)rI   Úcheck_outputÚshlexÚsplitÚstripÚendswith)r+   Ú
out_strings     r   r¥   r¥   S  s<   € ä×(Ò(¬¯ª°R«¸NÐ;KÑ)KÓL€JØ×ÑÓ×&Ñ& yÓ1Ð1r   )r+   zstr | shlex._ShlexInstreamr¬   Úbool)$r‘   Ú
__future__r   rY   r-   rd   rÅ   rI   r·   r=   r¶   r   Úpackaging.versionr?   Úerrorsr   r   Úloggingr   Úplatform.detectr	   Ú r   r   r�   rb   r   rZ   r   r    r)   rº   r»   r'   r¥   Úget_versionsr   r   r   Ú<module>rÒ      s�   ðñõ #ã Û 	Û Û Û Û 
Û Ý %ã ç )Ý  Ý &Ý Ý  á�Ó€òðIð ôG
ˆt�}‰}ô G
ôV!7�hô !7ðP €Ø€Ø Ð ò.Aôb2ð €ðr   