Ë
    óÿæiŒV  ã                   ó  — d dl Z d dl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
mZmZ ddlmZmZmZ ddlmZmZmZmZmZmZmZmZmZmZmZ ej:                  dk(  rdZn?ej:                  d	k(  rd
Zn- ej>                  djA                  ej:                  «      «       dZ	 	 dd„Z!dd„Z"	 	 d d„Z#	 	 d!d„Z$d"d„Z%edfedfedfedfedfedfedfedfedfedfdœ
Z&d#d„Z'	 	 d$d„Z(d„ Z)d„ Z*d„ Z+	 	 d%d„Z,d„ Z-d&d„Z.d'd„Z/y)(é    N)ÚPath)Úget_config_varÚget_config_varsÚget_pathé   )ÚCCompilerRunnerÚCppCompilerRunnerÚFortranCompilerRunner)Úget_abspathÚ	make_dirsÚcopyÚGlobÚArbitraryDepthGlobÚglob_at_depthÚimport_module_from_fileÚpyx_is_cplusÚsha256_of_stringÚsha256_of_fileÚCompileErrorÚposixz.oÚntz.objzUnknown os.name: {}c                 óœ  — i }|�ˆ|j                  «       D ]u  \  }}	t        |t        «      r*t        j                  |j                  «      D ]  }
|	||
<   Œ	 Œ@t        |t
        «      r!t        |j                  |«      D ]  }
|	||
<   Œ	 Œq|	||<   Œw |xs d}t        j                  j                  |«      sDt        j                  j                  |«      rt        dj                  |«      «      ‚t        |«       |€d}| D ]  }t        ||dd¬«       Œ g }| D ]µ  }|r#t        j                  j!                  |«      \  }}n?t        j                  j!                  t        j                  j#                  |«      «      \  }}|j                  «       }|j%                  |j'                  |i «      «       |j)                  t+        ||fd|i|¤Ž«       Œ· |S )a‘   Compile source code files to object files.

    Parameters
    ==========

    files : iterable of str
        Paths to source files, if ``cwd`` is given, the paths are taken as relative.
    Runner: CompilerRunner subclass (optional)
        Could be e.g. ``FortranCompilerRunner``. Will be inferred from filename
        extensions if missing.
    destdir: str
        Output directory, if cwd is given, the path is taken as relative.
    cwd: str
        Working directory. Specify to have compiler run in other directory.
        also used as root of relative paths.
    keep_dir_struct: bool
        Reproduce directory structure in `destdir`. default: ``False``
    per_file_kwargs: dict
        Dict mapping instances in ``files`` to keyword arguments.
    \*\*kwargs: dict
        Default keyword arguments to pass to ``Runner``.

    Returns
    =======
    List of strings (paths of object files).
    Ú.z{} is not a directoryT)Úonly_updateÚdest_is_dirÚcwd)ÚitemsÚ
isinstancer   ÚglobÚpathnamer   r   ÚfilenameÚosÚpathÚisdirÚexistsÚOSErrorÚformatr   r   ÚsplitextÚbasenameÚupdateÚgetÚappendÚsrc2obj)ÚfilesÚRunnerÚdestdirr   Úkeep_dir_structÚper_file_kwargsÚkwargsÚ_per_file_kwargsÚkÚvr#   ÚfÚdstpathsÚnameÚextÚfile_kwargss                   ú}/Volumes/fast/ai/experiments/voice-extract-mac/.venv/lib/python3.12/site-packages/sympy/utilities/_compilation/compilation.pyÚcompile_sourcesr=      s•  € ð8 ÐàÐ"Ø#×)Ñ)Ö+‰DˆAˆqÜ˜!œTÔ"Ü ŸI™I a§j¡jÖ1�DØ-.Ð$ TÒ*ñ 2ä˜AÔ1Ô2Ü)¨!¯*©*°cÖ:�DØ-.Ð$ TÒ*ñ ;ð '(Ð  Ò#ð ,ð Šn˜€GÜ�7‰7�=‰=˜Ô!Ü�7‰7�>‰>˜'Ô"ÜÐ1×8Ñ8¸ÓAÓBÐBä�gÔØ
€{ØˆÛˆAÜ��G¨¸4Ö@ð ð €HÛˆÙÜŸ™×(Ñ(¨Ó+‰IˆD‘#äŸ™×(Ñ(¬¯©×)9Ñ)9¸!Ó)<Ó=‰IˆD�#Ø—k‘k“mˆØ×ÑÐ+×/Ñ/°°2Ó6Ô7Ø�‰œ  6ÑB¨sÐB°kÑBÕCð ð €Oó    c                 óü   — | xs  t         j                  j                  dd«      } | j                  «       dk(  r|rt        dddgi| fS t        ddgi| fS | j                  «       dk(  s	 |rt
        ddgi| fS t        i | fS )	NÚSYMPY_COMPILER_VENDORÚgnuÚintelÚflagsz-nofor_mainz-cxxlibÚlib_optionsÚfortran)r"   Úenvironr+   Úlowerr
   r	   Ú
ValueError©ÚvendorÚcplusr   s      r<   Úget_mixed_fort_c_linkerrL   a   s¦   € ØÒE”r—z‘z—~‘~Ð&=¸uÓE€Fà‡|�|ƒ~˜Ò ÙÜ)Ø˜}¨iÐ8Ð9¸6ðCð Cô *Ø˜}˜oÐ.°ð8ð 8à	�‰‹˜5Ò	  FÙÜ%Ø" Y KÐ0°&ð:ð :ô *Ø˜ð ð  r>   c                 óx  — |€Rt         j                  j                  t         j                  j                  | d   «      «      \  }}	|r|t	        d«      z  }|sj|rYt        |j                  dd«      ||¬«      \  }}
}|
j                  «       D ]#  \  }}||v r||   j                  |«       Œ|||<   Œ% n|rt        }nt        }|j                  dg «      }|rd|vr|j                  d«       |j                  dd	«      }|st        d
«      ‚t        ||¬«      } || |xs g z   ||fd|i|¤Ž}|j                  «        |S )a    Link object files.

    Parameters
    ==========

    obj_files: iterable of str
        Paths to object files.
    out_file: str (optional)
        Path to executable/shared library, if ``None`` it will be
        deduced from the last item in obj_files.
    shared: bool
        Generate a shared library?
    Runner: CompilerRunner subclass (optional)
        If not given the ``cplus`` and ``fort`` flags will be inspected
        (fallback is the C compiler).
    cwd: str
        Path to the root of relative paths and working directory for compiler.
    cplus: bool
        C++ objects? default: ``False``.
    fort: bool
        Fortran objects? default: ``False``.
    extra_objs: list
        List of paths to extra object files / static libraries.
    \*\*kwargs: dict
        Keyword arguments passed to ``Runner``.

    Returns
    =======

    The absolute path to the generated shared object / executable.

    NéÿÿÿÿÚ
EXT_SUFFIXrJ   rI   rC   z-sharedÚ
run_linkerTz*run_linker was set to False (nonsensical).©r   r   )r"   r#   r(   r)   r   rL   r+   r   Úexpandr	   r   Úpopr,   rH   r   Úrun)Ú	obj_filesÚout_fileÚsharedr/   r   rK   ÚfortÚ
extra_objsr3   r:   Úextra_kwargsrJ   r5   r6   rC   rP   Úrunners                    r<   Úlinkr\   v   sA  € ðD ÐÜŸ™×(Ñ(¬¯©×)9Ñ)9¸)ÀB¹-Ó)HÓI‰ˆ�#ÙØœ |Ó4Ñ4ˆHáÙä'Ø!Ÿ:™: h°Ó5ØØôñ )ˆF�L &ð %×*Ñ*Ö,‘��1Ø˜‘;Ø˜1‘I×$Ñ$ QÕ'à !�F˜1’Iñ	 -ñ Ü*‘ä(�à�J‰J�w Ó#€EÙØ˜EÑ!Ø�L‰L˜Ô#Ø—‘˜L¨$Ó/€JÙÜÐEÓFÐFä˜8¨Ô-€HÙ�I˜zÒ/¨RÑ0°(¸EÑUÀsÐUÈfÑU€FØ
‡J�J„LØ€Or>   c                 ó(  — |xs g }|j                  dg «      }|j                  dg «      }	t        j                  dk(  rt        j                  d«       �nxt        j                  dk(  rßt        «       }
|j                  dg «      |
d   gz   |d<   |	|
d   gz  }	d	}|
d
   j                  «       D ][  }|r|j                  dg «      d|gz   |d<   d	}Œ"|j                  d«      r|j                  |dd «       ŒH|j                  d«      sŒZd}Œ] |
d   }dj                  |j                  d«      dd «      dd }|j                  |«       n†t        j                  dd dk(  rnot        d«      rct        «       }
|j                  dg «      |
d   gz   |d<   |	|
d   gz  }	|
d   j                  «       D ]  }|j                  d«      sŒ||dd gz  }Œ n	 |j                  dg «      }d}|D ]  }||vsŒ|j                  |«       Œ t        | fd|||||||	|dœ	|¤ŽS )a‘   Link Python extension module (shared object) for importing

    Parameters
    ==========

    obj_files: iterable of str
        Paths to object files to be linked.
    so_file: str
        Name (path) of shared object file to create. If not specified it will
        have the basname of the last object file in `obj_files` but with the
        extension '.so' (Unix).
    cwd: path string
        Root of relative paths and working directory of linker.
    libraries: iterable of strings
        Libraries to link against, e.g. ['m'].
    cplus: bool
        Any C++ objects? default: ``False``.
    fort: bool
        Any Fortran objects? default: ``False``.
    extra_objs: list
        List of paths of extra object files / static libraries to link against.
    kwargs**: dict
        Keyword arguments passed to ``link(...)``.

    Returns
    =======

    Absolute path to the generate shared object.
    Úinclude_dirsÚlibrary_dirsÚwin32zWindows not yet supported.ÚdarwinÚlinklineÚLDFLAGSÚLIBDIRFÚLIBSz
-frameworkz-lé   NTÚLIBRARYr   rN   é   ÚaixÚPy_ENABLE_SHAREDÚ
BLDLIBRARYrC   )ú-pthread)	rW   rC   r   rK   rX   r^   Ú	librariesr_   rY   )rS   ÚsysÚplatformÚwarningsÚwarnr   r+   ÚsplitÚ
startswithr,   Újoinr   r\   )rU   Úso_filer   rm   rK   rX   rY   r3   r^   r_   ÚcfgDictÚis_frameworkÚoptÚlibfileÚlibnamerC   Úneeded_flagsÚflags                     r<   Ú
link_py_sor}   ¾   sF  € ð> ’˜R€Ià—:‘:˜n¨bÓ1€LØ—:‘:˜n¨bÓ1€Lô
 ‡|�|�wÒÜ�‰Ð2Ö3Ü	�‰˜Ò	!Ü!Ó#ˆØ#ŸZ™Z¨
°BÓ7¸7À9Ñ;MÐ:NÑNˆˆzÑØ˜ Ñ*Ð+Ñ+ˆð ˆØ˜6‘?×(Ñ(Ö*ˆCÙØ%+§Z¡Z°
¸BÓ%?À<ÐQTÐBUÑ%U��zÑ"Ø$‘Ø—‘ Ô%Ø× Ñ   Q R Õ)Ø—‘ Õ-Ø#‘ð +ð ˜)Ñ$ˆØ—(‘(˜7Ÿ=™=¨Ó-¨c¨rÐ2Ó3°A°BÐ7ˆØ×Ñ˜Õ!ä	�‰�b�qÐ	˜UÒ	"àäÐ,Ô-Ü%Ó'ˆGØ!'§¡¨J¸Ó!;¸wÀyÑ?QÐ>RÑ!RˆF�:ÑØ˜W XÑ.Ð/Ñ/ˆLØ˜|Ñ,×2Ñ2Ö4�Ø—>‘> $Õ'Ø # a b ' Ñ*‘Iñ 5ð à�J‰J�w Ó#€EØ €LÛˆØ�uÒØ�L‰L˜Õð ô �	ð L $¨e¸ÀEÐPTØ)°YØ)°jñLàDJñLð Lr>   c                 óÜ  — ddl m}m} ddl m} | j	                  «       j                  d«      s!| j	                  «       j                  d«      sJ ‚|xs d}|xs d}|j                  dd«      rd	nd
}t        j                  j                  t        j                  j                  | «      «      d   |z   }t        j                  j                  ||«      }	|rt        j                  «       }
nd}
t        j                  |«       	  ||«      }|j                  j                  |«       d|vrd|j                  d<    || g|«      }|j                   dkD  rt#        d«      ‚t        j                  j%                  t        j                  j'                  | «      «      t        j                  j%                  |«      k7  r…t        j                  j)                  |	«      rt        j*                  |	«       t-        j.                  t        j                  j                  t        j                  j'                  | «      |«      |«       t        j                  |
«       |	S # t        j                  |
«       w xY w)a¬   Generates a C file from a Cython source file.

    Parameters
    ==========

    src: str
        Path to Cython source.
    destdir: str (optional)
        Path to output directory (default: '.').
    cwd: path string (optional)
        Root of relative paths (default: '.').
    **cy_kwargs:
        Second argument passed to cy_compile. Generates a .cpp file if ``cplus=True`` in ``cy_kwargs``,
        else a .c file.
    r   )Údefault_optionsÚCompilationOptions)Úcompileú.pyxz.pyr   rK   Fú.cppú.cÚlanguage_levelrh   zCython compilation failed.)ÚCython.Compiler.Mainr   r€   r�   rG   Úendswithr+   r"   r#   r(   r)   rt   ÚgetcwdÚchdirÚ__dict__r*   Ú
num_errorsrH   ÚrealpathÚdirnamer%   ÚunlinkÚshutilÚmove)Úsrcr0   r   Ú	cy_kwargsr   r€   Ú
cy_compiler:   Úc_nameÚdstfileÚori_dirÚ
cy_optionsÚ	cy_results                r<   Úsimple_cythonizer™     sÀ  € ÷ õ ;à�9‰9‹;×Ñ Ô'¨3¯9©9«;×+?Ñ+?ÀÔ+FÐFÐFØ
Š*�€CØŠn˜€Gà—M‘M '¨5Ô1‰&°t€CÜ�W‰W×ÑœbŸg™g×.Ñ.¨sÓ3Ó4°QÑ7¸#Ñ=€Fä�g‰g�l‰l˜7 FÓ+€Gá
Ü—)‘)“+‰àˆÜ‡H�HˆS„MðÙ'¨Ó8ˆ
Ø×Ñ×"Ñ" 9Ô-ð  9Ñ,Ø45ˆJ×ÑÐ 0Ñ1Ù ˜u jÓ1ˆ	Ø×Ñ !Ò#ÜÐ9Ó:Ð:ô
 �7‰7×ÑœBŸG™GŸO™O¨CÓ0Ó1´R·W±W×5EÑ5EÀgÓ5NÒNÜ�w‰w�~‰~˜gÔ&Ü—	‘	˜'Ô"Ü�K‰KœŸ™Ÿ™¤R§W¡W§_¡_°SÓ%9¸6ÓBÀGÔLä
�‰�ÔØ€Nøô 	�‰�Õús   ÄD;I ÉI+Úf95Úf2003Úf2008)
r„   rƒ   z.cxxz.fz.forz.ftnz.f90z.f95z.f03z.f08c                 óz  — t         j                  j                  t         j                  j                  | «      «      \  }}|€Gt         j                  j	                  | «      rd}n%t         j                  j                  | «      }|xs d}t         j                  j                  |«      r't         j                  j                  ||t        z   «      }|j                  dg «      }|r t        d«      }	|	|vr|j                  |	«       |j                  «       dk(  rt        | f|||dœ|¤ŽS |€#t        |j                  «          \  }}
d|vr|
|d<   |j                  dg «      }d}|D ]  }||vsŒ|j                  |«       Œ |j                  d	d
«      }|rt        d«      ‚ || g|f||||dœ|¤Ž}|j!                  «        |S )a¸   Compiles a source code file to an object file.

    Files ending with '.pyx' assumed to be cython files and
    are dispatched to pyx2obj.

    Parameters
    ==========

    srcpath: str
        Path to source file.
    Runner: CompilerRunner subclass (optional)
        If ``None``: deduced from extension of srcpath.
    objpath : str (optional)
        Path to generated object. If ``None``: deduced from ``srcpath``.
    cwd: str (optional)
        Working directory and root of relative paths. If ``None``: current dir.
    inc_py: bool
        Add Python include path to kwarg "include_dirs". Default: False
    \*\*kwargs: dict
        keyword arguments passed to Runner or pyx2obj

    r   r^   Úincluder‚   )Úobjpathr^   r   ÚstdrC   )ú-fPICrP   Fz#src2obj called with run_linker=True)r^   rP   r   rC   )r"   r#   r(   r)   Úisabsr�   r$   rt   ÚobjextrS   r   r,   rG   Úpyx2objÚextension_mappingr   rT   )Úsrcpathr/   rŸ   r   Úinc_pyr3   r9   r:   r^   Ú
py_inc_dirr    rC   r{   r|   rP   r[   s                   r<   r-   r-   ]  s£  € ô. —‘× Ñ ¤§¡×!1Ñ!1°'Ó!:Ó;�I€Dˆ#Ø€Ü�7‰7�=‰=˜Ô!Ø‰Gä—g‘g—o‘o gÓ.ˆGØ’n ˆGä	‡w�w‡}�}�WÔÜ—'‘'—,‘,˜w¨¬v©Ó6ˆà—:‘:˜n¨bÓ1€LÙÜ˜iÓ(ˆ
Ø˜\Ñ)Ø×Ñ 
Ô+à
‡y�yƒ{�fÒÜ�wð !¨¸lÐPSñ !Øñ!ð 	!ð €~Ü'¨¯	©	«Ñ4‰ˆ�Ø˜ÑØˆF�5‰Mà�J‰J�w Ó#€EØ€LÛˆØ�uÒØ�L‰L˜Õð ð
 —‘˜L¨%Ó0€JÙÜÐ@ÓAÐAá�W�I˜wð K°\Ø)¨s¸%ñKØCIñK€Fà
‡J�J„LØ€Nr>   c                 óJ  — | j                  d«      sJ ‚|xs d}|xs d}|xs t        j                  j                  |«      }t	        ||¬«      }t        j                  j                  |«      rht        j                  j                  | «      }	t        j                  j                  |	«      \  }
}t        j                  j                  ||
t        z   «      }|xs i }||d<   |€t        | «      }||d<   t        | f||dœ|¤Ž}|xs g }|j                  dg «      }d}|D ]  }||vsŒ|j                  |«       Œ |j                  d	g «      }|j                  d
d«      rt        d«      ‚|r|j                  dd«      }n|j                  dd«      }t        |f||||||dddœ|¤ŽS )a9  
    Convenience function

    If cwd is specified, pyxpath and dst are taken to be relative
    If only_update is set to `True` the modification time is checked
    and compilation is only run if the source is newer than the
    destination

    Parameters
    ==========

    pyxpath: str
        Path to Cython source file.
    objpath: str (optional)
        Path to object file to generate.
    destdir: str (optional)
        Directory to put generated C file. When ``None``: directory of ``objpath``.
    cwd: str (optional)
        Working directory and root of relative paths.
    include_dirs: iterable of path strings (optional)
        Passed onto src2obj and via cy_kwargs['include_path']
        to simple_cythonize.
    cy_kwargs: dict (optional)
        Keyword arguments passed onto `simple_cythonize`
    cplus: bool (optional)
        Indicate whether C++ is used. default: auto-detect using ``.util.pyx_is_cplus``.
    compile_kwargs: dict
        keyword arguments passed onto src2obj

    Returns
    =======

    Absolute path of generated object file.

    r‚   r   rQ   Ú
output_dirrK   ©r0   r   rC   )z-fwrapvrl   r¡   ÚoptionsÚstrict_aliasingFz/Cython requires strict aliasing to be disabled.r    zc++98Úc99T)rŸ   r   r^   rC   r    r¬   r§   r­   )r‡   r"   r#   r�   r   r$   r)   r(   rt   r£   r   r™   rS   r,   r   r-   )ÚpyxpathrŸ   r0   r   r^   r’   rK   r3   Úabs_objpathÚ	pyx_fnamer9   r:   Úinterm_c_filerC   r{   r|   r¬   r    s                     r<   r¤   r¤   Ÿ  s£  € ðJ ×Ñ˜FÔ#Ð#Ð#Ø
Š*�€CØŠn˜€GØÒ1œŸ™Ÿ™¨Ó1€Gä˜g¨3Ô/€Kä	‡w�w‡}�}�[Ô!Ü—G‘G×$Ñ$ WÓ-ˆ	Ü—G‘G×$Ñ$ YÓ/‰	ˆˆcÜ—'‘'—,‘,˜w¨¬v©Ó6ˆà’˜R€IØ!€IˆlÑØ€}Ü˜WÓ%ˆØ€IˆgÑä$ WÐT°gÀ3ÑTÈ)ÑT€MàÒ% 2€LØ�J‰J�w Ó#€EØ3€LÛˆØ�uÒØ�L‰L˜Õð ð �j‰j˜ BÓ'€Gà‡z�zÐ# UÔ+ÜÐLÓMÐMñ Ø�j‰j˜ Ó(‰à�j‰j˜ Ó&ˆä�=ð ¨'°sØ ,°E¸sØ"¨4Àñð ñð r>   c                 óª   — | D ]N  }t         j                  j                  |«      \  }}|j                  «       }|t        v sŒ>t        |   d   |k(  sŒN y y)Nr   TF)r"   r#   r(   rG   r¥   )ÚsrcsÚclsr‘   r9   r:   Úkeys         r<   Ú_any_Xr·   ð  sR   € ÛˆÜ—G‘G×$Ñ$ SÓ)‰	ˆˆcØ�i‰i‹kˆØÔ#Ò#Ü  Ñ% aÑ(¨CÓ/Ùð ð r>   c                 ó"   — t        | t        «      S ©N)r·   r
   ©r´   s    r<   Úany_fortran_srcr»   ú  s   € Ü�$Ô-Ó.Ð.r>   c                 ó"   — t        | t        «      S r¹   )r·   r	   rº   s    r<   Úany_cplus_srcr½   þ  s   € Ü�$Ô)Ó*Ð*r>   c           	      óÄ  — |€Bt         j                  j                  t         j                  j                  | d   «      «      d   }|xs i }|xs i }	 t	        t         j                  j                  ||«      | «      }|S # t        $ rX t        t        t        t        | «      «      f||dœ|¤Ž}t        |f|t        | «      t        | «      |dœ|¤Ž}t	        |«      }Y |S w xY w)a~   Compiles sources to a shared object (Python extension) and imports it

    Sources in ``sources`` which is imported. If shared object is newer than the sources, they
    are not recompiled but instead it is imported.

    Parameters
    ==========

    sources : list of strings
        List of paths to sources.
    extname : string
        Name of extension (default: ``None``).
        If ``None``: taken from the last file in ``sources`` without extension.
    build_dir: str
        Path to directory in which objects files etc. are generated.
    compile_kwargs: dict
        keyword arguments passed to ``compile_sources``
    link_kwargs: dict
        keyword arguments passed to ``link_py_so``
    extra_objs: list
        List of paths to (prebuilt) object files / static libraries to link against.

    Returns
    =======

    The imported module from of the Python extension.
    rN   r   r«   )r   rX   rK   rY   )r"   r#   r(   r)   r   rt   ÚImportErrorr=   ÚlistÚmapr   r}   r»   r½   )	ÚsourcesÚextnameÚ	build_dirÚcompile_kwargsÚlink_kwargsrY   ÚmodÚobjsÚsos	            r<   Úcompile_link_import_py_extrÊ     sì   € ð: €Ü—'‘'×"Ñ"¤2§7¡7×#3Ñ#3°G¸B±KÓ#@ÓAÀ!ÑDˆà#Ò) r€NØÒ# €Kð*Ü%¤b§g¡g§l¡l°9¸gÓ&FÈÓPˆð €Jøô ò *Üœt¤C¬°WÓ$=Ó>ð @È	Ø#,ñ@Ø0>ñ@ˆä˜ð \ )´/À'Ó2JÜ+¨GÓ4Àñ\ØOZñ\ˆä% bÓ)‰Ø€Jð*ús   Á*A> Á>ACÃCc                 ó,  — |xs t        j                  «       }t        j                  j	                  |«      st        d|«      ‚g }| D �].  \  }}t        j                  j                  ||«      }d}t        |j                  d«      «      j                  «       }t        j                  j                  |«      r]t        j                  j                  |dz   «      rt        |dz   «      j                  «       }nt        |«      j                  «       }||k7  }|rOt        |d«      5 }	|	j                  |«       d d d «       t        |dz   d«      5 }	|	j                  |«       d d d «       |j!                  |«       �Œ1 ||fS # 1 sw Y   ŒJxY w# 1 sw Y   Œ-xY w)NzNon-existent directory: Túutf-8z.sha256Úwt)ÚtempfileÚmkdtempr"   r#   r$   r&   rt   r   ÚencodeÚ	hexdigestr%   r   Ú	read_textr   ÚopenÚwriter,   )
rÂ   rÄ   Úsource_filesr9   r‘   ÚdestÚdiffersÚsha256_in_memÚsha256_on_diskÚfhs
             r<   Ú_write_sources_to_build_dirrÛ   0  sA  € ØÒ/œX×-Ñ-Ó/€IÜ�7‰7�=‰=˜Ô#ÜÐ0°)Ó<Ð<à€LÜ‰	ˆˆcÜ�w‰w�|‰|˜I tÓ,ˆØˆÜ(¨¯©°GÓ)<Ó=×GÑGÓIˆÜ�7‰7�>‰>˜$ÔÜ�w‰w�~‰~˜d YÑ.Ô/Ü!% d¨YÑ&6Ó!7×!AÑ!AÓ!C‘ä!/°Ó!5×!?Ñ!?Ó!A�à$¨Ñ5ˆGÙÜ�d˜DÔ! RØ—‘˜”÷ "ä�d˜YÑ&¨Ô-°Ø—‘˜Ô'÷ .à×Ñ˜DÖ!ð! ð" ˜Ð"Ð"÷ "Ð!úç-Ð-ús   Ä#E>ÅF
Å>F	Æ
F	c                 óL   — t        | |«      \  }}t        |fd|i|¤Ž}d|i}||fS )aå   Compiles, links and imports extension module from source.

    Parameters
    ==========

    sources : iterable of name/source pair tuples
    build_dir : string (default: None)
        Path. ``None`` implies use a temporary directory.
    **kwargs:
        Keyword arguments passed onto `compile_link_import_py_ext`.

    Returns
    =======

    mod : module
        The compiled and imported extension module.
    info : dict
        Containing ``build_dir`` as 'build_dir'.

    rÄ   )rÛ   rÊ   )rÂ   rÄ   r3   rÕ   rÇ   Úinfos         r<   Úcompile_link_import_stringsrÞ   J  s=   € ô* :¸'À9ÓMÑ€L�)Ü
$ \Ñ
Q¸YÐ
QÈ&Ñ
Q€CØ˜Ð#€DØ�ˆ9Ðr>   c                 óÚ  — |r|�t        d«      ‚	 t        | |«      \  }}t        t        t	        t
        |«      «      f||dœ|xs i ¤Ž}t        |f|t        |«      t        |«      dœ|xs i ¤Ž}t        j                  |gt        j                  t        j                  ¬«      }|j                  «       }	|j                  «       D �
cg c]  }
|
j                  d«      ‘Œ c}
\  }}|r7t        j                   j#                  |«      rt%        j&                  |«       d}	 |	|dœ}||f|fS c c}
w # |r8t        j                   j#                  |«      rt%        j&                  |«       d}w w w xY w)ay   Compiles, links and runs a program built from sources.

    Parameters
    ==========

    sources : iterable of name/source pair tuples
    build_dir : string (default: None)
        Path. ``None`` implies use a temporary directory.
    clean : bool
        Whether to remove build_dir after use. This will only have an
        effect if ``build_dir`` is ``None`` (which creates a temporary directory).
        Passing ``clean == True`` and ``build_dir != None`` raises a ``ValueError``.
        This will also set ``build_dir`` in returned info dictionary to ``None``.
    compile_kwargs: dict
        Keyword arguments passed onto ``compile_sources``
    link_kwargs: dict
        Keyword arguments passed onto ``link``

    Returns
    =======

    (stdout, stderr): pair of strings
    info: dict
        Containing exit status as 'exit_status' and ``build_dir`` as 'build_dir'

    NzIAutomatic removal of build_dir is only available for temporary directory.r«   )r   rX   rK   )ÚstdoutÚstderrrÌ   )Úexit_statusrÄ   )rH   rÛ   r=   rÀ   rÁ   r   r\   r»   r½   Ú
subprocessÚPopenÚPIPEÚwaitÚcommunicateÚdecoder"   r#   r$   r�   Úrmtree)rÂ   rÄ   ÚcleanrÅ   rÆ   rÕ   rÈ   ÚprogÚprâ   Útxtrà   rá   rÝ   s                 r<   Úcompile_run_stringsrî   e  sT  € ñ6 �Ð&ÜÐdÓeÐeðÜ"=¸gÀyÓ"QÑˆ�iÜœt¤C¬°\Ó$BÓCð HÈYØ#,ñHØ1?Ò1EÀ2ñHˆä�Dð N˜iÜ(¨Ó6Ü'¨Ó5ñNà:EÒ:KÈñNˆô ×Ñ˜d˜V¬J¯O©OÄJÇOÁOÔTˆØ—f‘f“hˆØ9:¿¹¼ÓI¹°#˜#Ÿ*™* WÕ-¸ÑI‰ˆ�á”R—W‘W—]‘] 9Ô-Ü�M‰M˜)Ô$Ø‰IØ&°YÑ?€DØ�FÐ˜TÐ!Ð!ùò Jøá”R—W‘W—]‘] 9Ô-Ü�M‰M˜)Ô$Ø‰Ið .ˆ5ús   ‘B6D. ÃD)ÃD. Ä)D. Ä.<E*)NNNFN)NFN)NFNNFFN)NNNFFN)NN)NNNF)NNNNNN)Nr   NNNr¹   )NFNN)0r   r"   r�   rã   rn   rÎ   rp   Úpathlibr   Ú	sysconfigr   r   r   Úrunnersr   r	   r
   Úutilr   r   r   r   r   r   r   r   r   r   r   r9   r£   rq   r'   r=   rL   r\   r}   r™   r¥   r-   r¤   r·   r»   r½   rÊ   rÛ   rÞ   rî   © r>   r<   Ú<module>rô      s_  ðÛ Û 	Û Û Û 
Û Û Ý ß ?Ñ ?÷ñ ÷
÷ ÷ ñ ð ‡7�7ˆgÒØ�FØ‡W�W�‚_Ø�Fà€H‡M�MÐ'×.Ñ.¨r¯w©wÓ7Ô8Ø€Fð QVØ$(ó?óD-ð* 9=Ø7;óEðP =AØ37óTLón7ðv ˜DÐ
!Ø Ð%Ø Ð%Ø  $Ð
'Ø" DÐ)Ø" DÐ)Ø" DÐ)Ø" EÐ*Ø" GÐ,Ø" GÐ,ñÐ ó?ðD 6:Ø59óNòbò/ò+ð UYØ<@ó+ò\#ó4ô6,"r>   