Ë ciûjˆ Ôã ó>—dZddlZddlZddlZddlZddlZddlZddlmZddl m Z ddl m Z ddl mZmZmZmZddlmZmZdd lmZej.d gd gd gd gdgdgdgdgej0dœ «Zd„ZdZGd„de «ZGd„de«ZdZdZdZ d„Z!d„Z"dZ#y)adistutils.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_deprecation)ÚRangeMapÚmsvcr70Úmsvcr71Úmsvcr80Úmsvcr90Úmsvcr100Úmsvcr110Úmsvcr120Ú vcruntime140) iiixiÜi@i¤iiliÐcóè—tjdtj«} t |j d««} t|S#t $rYywxYw#t$rtd|z«‚wxYw)zaInclude the appropriate MSVC runtime library if Python was built with MSVC 7.0 or later. zMSC v\.(\d{4})rNzUnknown MS Compiler version %s ) ÚreÚsearchÚsysÚversionÚintÚgroupÚAttributeErrorÚ _msvcr_lookupÚKeyErrorÚ ValueError)ÚmatchÚmsc_vers úJ/usr/lib/python3.12/site-packages/setuptools/_distutils/cygwinccompiler.pyÚ get_msvcrr$4sx€ô �I‰IÐ'¬¯©Ó 5€EðÜ�e—k‘k !“nÓ%ˆðFܘWÑ%Ð%øô òÙðûô òFÜÐ:¸WÑDÓEÐEðFús¦A ÁAÁ AÁAÁA1zxUnable to set runtime library search path on Windows, usually indicated by `runtime_library_dirs` parameter to Extensionc󞇗eZdZdZdZdZdZdZdZdZ dZ dZ d Z dˆfd „ Z ed „«Zd „Z dd „Zd„Zˆfd„Zeˆfd„«ZˆxZS)ÚCygwinCCompilerz9Handles the Cygwin port of the GNU C compiler to Windows.Úcygwinz.oz.az.dll.az.dllzlib%s%szcyg%s%sz.exec ó\•—t‰|�|||«t«\}}|jdj ||««|t ur|j d|z«tjjdd«|_ tjjdd«|_ |j|_ d}|jd|jzd |jzd|jzd |jzd j |j|«¬ «t«|_y) 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ÚCXXzg++ú-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#r4zCygwinCCompiler.__init__Vsø€Ü ‰Ñ˜ '¨5Ô1ä(Ó*‰ˆ�Ø ×ÑØ 3× :Ñ :¸6À7Ó Kô ð œÑ $Ø �I‰IðOàQXñYô ô —*‘*—.‘.  uÓ-ˆŒÜ—:‘:—>‘> %¨Ó/ˆŒàŸ'™'ˆŒØ!ˆ à ×ÑØ+¨d¯g©gÑ5Ø4°t·w±wÑ>Ø/°$·(±(Ñ:Ø$ t§w¡wÑ.Ø'×.Ñ.¨t¯©À ÓNð ô ô'›[ˆÕócó�—tjdtd¬«t«5t d«cddd«S#1swYyxYw)Nz�gcc_version attribute of CygwinCCompiler is deprecated. Instead of returning actual gcc version a fixed value 11.2.0 is returned.é)Ú stacklevelz11.2.0)Úwarningsr9ÚDeprecationWarningr r )rBs r#Ú gcc_versionzCygwinCCompiler.gcc_versionvs8€ô � ‰ ð Xä Øõ  ô (Õ )Ü Ó)÷*× )Ò )ús § <¼Acóü—|dvr |jdd|d|g«y |j|j|z|d|gz|z«y#t$r}t|«‚d}~wwxYw#t$r}t|«‚d}~wwxYw)z:Compiles the source by spawning GCC and windres if needed.)ú.rcú.resÚwindresz-iz-oN)Úspawnrr r/)rBÚobjÚsrcÚextÚcc_argsÚextra_postargsÚpp_optsÚmsgs r#Ú_compilezCygwinCCompiler._compile…s�€à �/Ñ !ð (Ø— ‘ ˜I t¨S°$¸Ð<Õ=ð (Ø— ‘ Ø×$Ñ$ wÑ.°#°t¸SÐ1AÑAÀNÑRõøô &ò (Ü" 3Ó'Ð'ûð (ûô&ò (Ü" 3Ó'Ð'ûð (ús.†Až'A"Á AÁ AÁAÁ" A;Á+ A6Á6A;có„—tj| xsg«} tj|xsg«}tj|xsg«}|r|jt«|j|j«|�� ||j k7s|j dk(rítjj|d«}tjjtjj|««\}}tjj||dz«}dtjj|«zdg}|D]}|j|«Œ|jt||fd|z«|j|«| s| jd«t!j"||||||||d| | | | | «y) zLink the objects.Nr*rz.defz LIBRARY %sÚEXPORTSz writing %sz-s)Úcopyr9Ú_runtime_library_dirs_msgÚextendrAÚ EXECUTABLEr?r:ÚpathÚdirnameÚsplitextÚbasenameÚjoinÚappendÚexecuterrÚlink)rBÚ target_descÚobjectsÚoutput_filenameÚ output_dirÚ librariesÚ library_dirsÚruntime_library_dirsÚexport_symbolsÚdebugÚ extra_preargsrZÚ build_tempÚ target_langÚtemp_dirÚdll_nameÚ dll_extensionÚdef_fileÚcontentsÚsyms r#rkzCygwinCCompiler.link•s‡€ô$Ÿ ™  -Ò"5°2Ó6ˆ Ü—I‘I˜išo¨2Ó.ˆ Ü—)‘)˜GšM rÓ*ˆá Ø �I‰IÔ/Ô 0ð ×ј×+Ñ+Ô,ð Ñ &Ø ˜4Ÿ?™?Ò *¨d¯o©oÀÒ.Fô—w‘w—‘ w¨q¡zÓ2ˆHä(*¯©×(8Ñ(8Ü—‘× Ñ  Ó1ó)Ñ %ˆX�}ô —w‘w—|‘| H¨h¸Ñ.?Ó@ˆHð%¤r§w¡w×'7Ñ'7¸Ó'HÑHÈ)ÐTˆHÛ%�Ø—‘ Õ$ð&à �L‰Lœ h°Ð%9¸<È(Ñ;RÔ Sð �N‰N˜8Ô $ñØ × Ñ  Ô &ä×ÑØ Ø Ø Ø Ø Ø Ø Ø Ø Ø Ø Ø Ø Ø õ rJcó0—|jt«gS©N)r9ra©rBÚdirs r#Úruntime_library_dir_optionz*CygwinCCompiler.runtime_library_dir_optionïs€ð � ‰ Ô+Ô,؈ rJcód•—tjj|«}t‰|�|||«Sr)r:rdÚnormcaser3Ú_make_out_path)rBroÚ strip_dirÚsrc_nameÚ norm_src_namerIs €r#r…zCygwinCCompiler._make_out_pathøs+ø€äŸ™×(Ñ(¨Ó2ˆ ܉wÑ% j°)¸]ÓKÐKrJcób•—it‰|�¥dD�cic]}|||jz“Œc}¥Scc}w)z3 Add support for rc and res files. )rSrR)r3Úout_extensionsÚ obj_extension)rBrXrIs €r#rŠzCygwinCCompiler.out_extensionsýsDø€ð  ܉gÑ$ð á8GÓH¹°ˆs�C˜$×,Ñ,Ñ,Ñ,¸ÑHð ð ùâHs‘,©rrr) NNNNNrNNNN)Ú__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_extensionr4ÚpropertyrPr]rkr‚r…rŠÚ __classcell__©rIs@r#r&r&Isžø„ÙCà€MØ€MØÐØ#ÐØ ÐØ!ÐØ!ÐØ ÐØ€Mõ)ð@ñ *óð *ò(ð*ØØØ!ØØØØØØóX òtôLð ó óô rJr&có.‡—eZdZdZdZdˆfd„ Zd„ZˆxZS)ÚMingw32CCompilerz:Handles the Mingw32 port of the GNU C compiler to Windows.Úmingw32c ó4•—t‰|�|||«d}t|j«r t d«‚|j d|jzd|jzd|j zd|jzdj|j|«¬«y)Nr,z1Cygwin gcc cannot be used with --compiler=mingw32z %s -O -Wallz%s -mdll -O -Wallz%sz{} {}r-) r3r4Ú is_cygwinccr=r r@r>r7r?)rBrCrDrErHrIs €r#r4zMingw32CCompiler.__init__s…ø€Ü ‰Ñ˜ '¨5Ô1à!ˆ ä �t—w‘wÔ Ü Ð!TÓUÐ Uà ×ÑØ" T§W¡WÑ,Ø+¨d¯g©gÑ5Ø&¨¯©Ñ1ؘdŸg™g‘~Ø—n‘n T§_¡_°mÓDð õ rJcó —tt«‚r)rrar€s r#r‚z+Mingw32CCompiler.runtime_library_dir_options€Ü$Ô%>Ó?Ð?rJrŒ)r�rŽr�r�r‘r4r‚ršr›s@r#r�r� sø„ÙDà€Mõ ö @rJr�Úokznot okÚ uncertaincóÚ—ddlm}dtjvrtdfSdtjvrtdfS|j «} t |«} d|j«vrtd|zf|j«Std |zf|j«S#|j«wxYw#t$r,}td j||j«fcYd }~Sd }~wwxYw) awCheck 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ÚGCCzsys.version mentions 'GCC'ÚClangzsys.version mentions 'Clang'Ú__GNUC__z'%s' mentions '__GNUC__'z '%s' does not mention '__GNUC__'zcouldn't read '{}': {}N)Ú distutilsr¥rrr8Úget_config_h_filenameÚopenÚreadÚcloseÚCONFIG_H_NOTOKÚOSErrorÚCONFIG_H_UNCERTAINr7Ústrerror)r¥ÚfnÚconfig_hÚexcs r#r5r5+sÚ€õ*$ð ”— ‘ ÑÜÐ8Ð8Ð8ð”#—+‘+ÑÜÐ:Ð:Ð:ð × (Ñ (Ó *€Bð Wܘ“8ˆð ؘXŸ]™]›_Ñ,Ü"Ð$>ÀÑ$CÐCð �N‰NÕ ô&Ð'IÈBÑ'NÐNà �N‰NÕ øˆH�N‰NÕ ûÜ òWÜ"Ð$<×$CÑ$CÀBÈÏ É Ó$UÐVÕVûðWúsBÁ B5ÁB Á4B5 B ÂB5 B2Â2B5Â5 C*Â>!C%ÃC*Ã%C*có„—ttj|«dgz«}|j«j d«S)zCTry to determine if the compiler that would be used is from cygwin.z -dumpmachinescygwin)rÚshlexÚsplitÚstripÚendswith)r=Ú out_strings r#r r Zs6€äœeŸk™k¨"›o°Ð0@Ñ@ÓA€JØ × Ñ Ó × &Ñ & yÓ 1Ð1rJ)$r�r:rrr`r¶rNÚ subprocessrÚ unixccompilerrÚ file_utilrÚerrorsrrr r rr r Ú _collectionsr ÚleftÚundefined_valuerr$rar&r�r8r®r°r5r Ú get_versions©rJr#ÚrÄsÜðñó Û Û Û Û ÛÝ#å(Ý!÷ó÷ >Ý"ð�— ‘ ðˆkàˆkàˆkàˆkàˆlàˆlàˆlàÐØ×&Ñ&ñ#ó€ ò. Fð Iðô | �mô| ô@@�ô@ð:€ Ø€Ø Ðò,Wò^2ð € ðrJ