§
    PŠtjŒ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n8ej        d	k    rd
Zn* ej        d                      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/dS )*é    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: {}Fc                 óÔ  — i }|�‰|                      ¦   «         D ]t\  }}	t          |t          ¦  «        r"t          j        |j        ¦  «        D ]}
|	||
<   ŒŒ<t          |t
          ¦  «        rt          |j        |¦  «        D ]}
|	||
<   ŒŒo|	||<   Œu|pd}t          j	         
                    |¦  «        sPt          j	                             |¦  «        r"t          d                     |¦  «        ¦  «        ‚t          |¦  «         |€d}| D ]}t          ||dd¬¦  «         Œg }| D ]Æ}|r#t          j	                             |¦  «        \  }}n?t          j	                             t          j	                             |¦  «        ¦  «        \  }}|                     ¦   «         }|                     |                     |i ¦  «        ¦  «         |                     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).
    Nú.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                   úf/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/sympy/utilities/_compilation/compilation.pyÚcompile_sourcesr=      s  € ð8 ÐàÐ"Ø#×)Ò)Ñ+Ô+ð 	(ð 	(‰DˆAˆqÝ˜!�TÑ"Ô"ð (Ý œI a¤jÑ1Ô1ð /ð /�DØ-.Ð$ TÑ*Ð*ð/å˜AÕ1Ñ2Ô2ð (Ý)¨!¬*°cÑ:Ô:ð /ð /�DØ-.Ð$ TÑ*Ð*ð/ð '(Ð  Ñ#Ð#ð ˆn˜€GÝŒ7�=Š=˜Ñ!Ô!ð ÝŒ7�>Š>˜'Ñ"Ô"ð 	ÝÐ1×8Ò8¸ÑAÔAÑBÔBÐBå�gÑÔÐØ
€{ØˆØð 	Að 	AˆAÝ��G¨¸4Ð@Ñ@Ô@Ð@Ð@ð €HØð Dð DˆØð 	>Ýœ×(Ò(¨Ñ+Ô+‰IˆD�#�#åœ×(Ò(­¬×)9Ò)9¸!Ñ)<Ô)<Ñ=Ô=‰IˆD�#Ø—k’k‘m”mˆØ×ÒÐ+×/Ò/°°2Ñ6Ô6Ñ7Ô7Ð7Ø�Š�  6ÐBÐB¨sÐB°kÐBÐBÑCÔCÐCÐCØ€Oó    c                 ó  — | pt           j                             dd¦  «        } |                      ¦   «         dk    r|rt          dddgi| fS t          ddgi| fS |                      ¦   «         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ÚllvmÚlib_optionsÚfortran)r"   Úenvironr+   Úlowerr
   r	   Ú
ValueError©ÚvendorÚcplusr   s      r<   Úget_mixed_fort_c_linkerrM   a   s¼   € ØÐE•r”z—~’~Ð&=¸uÑEÔE€Fà‡|‚|�~„~˜Ò Ð Øð 	8Ý)Ø˜}¨iÐ8Ð9¸6ðCð Cõ *Ø˜}˜oÐ.°ð8ð 8à	�Š‰Œ˜5Ò	 Ð	 Ð	 Øð 	 Ý%Ø" Y KÐ0°&ð:ð :õ *Ø˜ð ð  r>   c                 óØ  — |€Yt           j                             t           j                             | d         ¦  «        ¦  «        \  }}	|r|t	          d¦  «        z  }|s}|rjt          |                     dd¦  «        ||¬¦  «        \  }}
}|
                     ¦   «         D ]*\  }}||v r||                              |¦  «         Œ%|||<   Œ+n|rt          }nt          }|                     dg ¦  «        }|rd|vr|                     d¦  «         |                     dd	¦  «        }|st          d
¦  «        ‚t          ||¬¦  «        } || |pg z   ||fd|i|¤Ž}|                     ¦   «          |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_SUFFIXrK   rJ   rC   z-sharedÚ
run_linkerTz*run_linker was set to False (nonsensical).©r   r   )r"   r#   r(   r)   r   rM   r+   r   Úexpandr	   r   Úpopr,   rI   r   Úrun)Ú	obj_filesÚout_fileÚsharedr/   r   rL   ÚfortÚ
extra_objsr3   r:   Úextra_kwargsrK   r5   r6   rC   rQ   Úrunners                    r<   Úlinkr]   v   s²  € ðD ÐÝœ×(Ò(­¬×)9Ò)9¸)ÀB¼-Ñ)HÔ)HÑIÔI‰ˆ�#Øð 	5Ø� |Ñ4Ô4Ñ4ˆHàð )Øð 	)å'Ø!Ÿ:š: h°Ñ5Ô5ØØðñ ô ñ )ˆF�L &ð %×*Ò*Ñ,Ô,ð "ð "‘��1Ø˜�;�;Ø˜1”I×$Ò$ QÑ'Ô'Ð'Ð'à !�F˜1‘I�Ið	"ð ð )Ý*��å(�à�JŠJ�w Ñ#Ô#€EØð $Ø˜EÐ!Ð!Ø�LŠL˜Ñ#Ô#Ð#Ø—’˜L¨$Ñ/Ô/€JØð GÝÐEÑFÔFÐFå˜8¨Ð-Ñ-Ô-€HØˆV�I˜zÐ/¨RÑ0°(¸EÐUÐUÀsÐUÈfÐUÐU€FØ
‡J‚J�L„L€LØ€Or>   c                 óö  — |pg }|                      dg ¦  «        }|                      dg ¦  «        }	t          j        dk    rt          j        d¦  «         �n×t          j        dk    �rt          ¦   «         }
|                     dg ¦  «        |
d         gz   |d<   |	|
d         gz  }	d	}|
d
                              ¦   «         D ]o}|r!|                     dg ¦  «        d|gz   |d<   d	}Œ%|                     d¦  «        r| 	                    |dd…         ¦  «         ŒX|                     d¦  «        rd}Œp|
d         }d 
                    |                     d¦  «        dd…         ¦  «        dd…         }| 	                    |¦  «         n§t          j        dd…         dk    rnŽt          d¦  «        r~t          ¦   «         }
|                     dg ¦  «        |
d         gz   |d<   |	|
d         gz  }	|
d                              ¦   «         D ]%}|                     d¦  «        r||dd…         gz  }Œ&n	 |                      dg ¦  «        }d}|D ]}||vr| 	                    |¦  «         Œ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   rO   é   ÚaixÚPy_ENABLE_SHAREDÚ
BLDLIBRARYrC   )ú-pthread)	rX   rC   r   rL   rY   r_   Ú	librariesr`   rZ   )rT   ÚsysÚplatformÚwarningsÚwarnr   r+   ÚsplitÚ
startswithr,   Újoinr   r]   )rV   Úso_filer   rn   rL   rY   rZ   r3   r_   r`   ÚcfgDictÚis_frameworkÚoptÚlibfileÚlibnamerC   Úneeded_flagsÚflags                     r<   Ú
link_py_sor~   ¾   sß  € ð> �˜R€Ià—:’:˜n¨bÑ1Ô1€LØ—:’:˜n¨bÑ1Ô1€Lõ
 „|�wÒÐÝŒÐ2Ñ3Ô3Ð3Ñ3Ý	Œ˜Ò	!Ñ	!Ý!Ñ#Ô#ˆØ#ŸZšZ¨
°BÑ7Ô7¸7À9Ô;MÐ:NÑNˆˆzÑØ˜ Ô*Ð+Ñ+ˆð ˆØ˜6”?×(Ò(Ñ*Ô*ð 	$ð 	$ˆCØð $Ø%+§Z¢Z°
¸BÑ%?Ô%?À<ÐQTÐBUÑ%U��zÑ"Ø$��Ø—’ Ñ%Ô%ð $Ø× Ò   Q R R¤Ñ)Ô)Ð)Ð)Ø—’ Ñ-Ô-ð $Ø#�øà˜)Ô$ˆØ—(’(˜7Ÿ=š=¨Ñ-Ô-¨c¨r¨cÔ2Ñ3Ô3°A°B°BÔ7ˆØ×Ò˜Ñ!Ô!Ð!Ð!å	Œ�b�q�bÔ	˜UÒ	"Ð	"àåÐ,Ñ-Ô-ð 	Ý%Ñ'Ô'ˆGØ!'§¢¨J¸Ñ!;Ô!;¸wÀyÔ?QÐ>RÑ!RˆF�:ÑØ˜W XÔ.Ð/Ñ/ˆLØ˜|Ô,×2Ò2Ñ4Ô4ð +ð +�Ø—>’> $Ñ'Ô'ð +Ø # a b b¤' Ñ*�Iøð+ð à�JŠJ�w Ñ#Ô#€EØ €LØð ð ˆØ�uÐÐØ�LŠL˜ÑÔÐøå�	ð L $¨e¸ÀEÐPTØ)°YØ)°jðLð LàDJðLð Lð Lr>   c                 óú  — ddl m}m} ddl m} |                      ¦   «                              d¦  «        s)|                      ¦   «                              d¦  «        sJ ‚|pd}|pd}|                     dd¦  «        rd	nd
}t          j         	                    t          j         
                    | ¦  «        ¦  «        d         |z   }t          j                             ||¦  «        }	|rt          j        ¦   «         }
nd}
t          j        |¦  «         	  ||¦  «        }|j                             |¦  «         d|vr
d|j        d<    || g|¦  «        }|j        dk    rt#          d¦  «        ‚t          j                             t          j                             | ¦  «        ¦  «        t          j                             |¦  «        k    rƒt          j                             |	¦  «        rt          j        |	¦  «         t-          j        t          j                             t          j                             | ¦  «        |¦  «        |¦  «         t          j        |
¦  «         n# t          j        |
¦  «         w xY w|	S )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   rL   Fú.cppú.cÚlanguage_levelri   zCython compilation failed.)ÚCython.Compiler.Mainr€   r�   r‚   rH   Úendswithr+   r"   r#   r(   r)   ru   ÚgetcwdÚchdirÚ__dict__r*   Ú
num_errorsrI   ÚrealpathÚdirnamer%   ÚunlinkÚshutilÚmove)Úsrcr0   r   Ú	cy_kwargsr€   r�   Ú
cy_compiler:   Úc_nameÚdstfileÚori_dirÚ
cy_optionsÚ	cy_results                r<   Úsimple_cythonizerš     sJ  € ð ð ð ð ð ð ð ð ð ;Ð:Ð:Ð:Ð:Ð:à�9Š9‰;Œ;×Ò Ñ'Ô'ÐF¨3¯9ª9©;¬;×+?Ò+?ÀÑ+FÔ+FÐFÐFÐFØ
ˆ*�€CØˆn˜€Gà—M’M '¨5Ñ1Ô1Ð
;ˆ&ˆ&°t€CÝŒW×Ò�bœg×.Ò.¨sÑ3Ô3Ñ4Ô4°QÔ7¸#Ñ=€FåŒg�lŠl˜7 FÑ+Ô+€Gà
ð Ý”)‘+”+ˆˆàˆÝ„HˆS�M„M€MðØ'Ð'¨Ñ8Ô8ˆ
ØÔ×"Ò" 9Ñ-Ô-Ð-ð  9Ð,Ð,Ø45ˆJÔÐ 0Ñ1Ø�J ˜u jÑ1Ô1ˆ	ØÔ !Ò#Ð#ÝÐ9Ñ:Ô:Ð:õ
 Œ7×Ò�BœGŸOšO¨CÑ0Ô0Ñ1Ô1µR´W×5EÒ5EÀgÑ5NÔ5NÒNÐNÝŒw�~Š~˜gÑ&Ô&ð #Ý”	˜'Ñ"Ô"Ð"ÝŒK�œŸš¥R¤W§_¢_°SÑ%9Ô%9¸6ÑBÔBÀGÑLÔLÐLå
Œ�ÑÔÐÐø�Œ�ÑÔÐÐøøøØ€Ns   ÄD:I" É"I8Úf95Úf2003Úf2008)
r…   r„   z.cxxz.fz.forz.ftnz.f90z.f95z.f03z.f08c                 óÎ  — t           j                             t           j                             | ¦  «        ¦  «        \  }}|€Et           j                             | ¦  «        rd}n#t           j                             | ¦  «        }|pd}t           j                             |¦  «        r(t           j                             ||t          z   ¦  «        }| 	                    dg ¦  «        }|r(t          d¦  «        }	|	|vr|                     |	¦  «         |                     ¦   «         dk    rt          | f|||dœ|¤ŽS |€+t          |                     ¦   «                  \  }}
d|vr|
|d<   | 	                    dg ¦  «        }d	}|D ]}||vr|                     |¦  «         Œ| 	                    d
d¦  «        }|rt          d¦  «        ‚ || g|f||||dœ|¤Ž}|                     ¦   «          |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

    Nr   r_   Úincluderƒ   )Úobjpathr_   r   ÚstdrC   )ú-fPICrQ   Fz#src2obj called with run_linker=True)r_   rQ   r   rC   )r"   r#   r(   r)   ÚisabsrŽ   r$   ru   ÚobjextrT   r   r,   rH   Úpyx2objÚextension_mappingr   rU   )Úsrcpathr/   r    r   Úinc_pyr3   r9   r:   r_   Ú
py_inc_dirr¡   rC   r|   r}   rQ   r\   s                   r<   r-   r-   ]  s  € õ. ”× Ò ¥¤×!1Ò!1°'Ñ!:Ô!:Ñ;Ô;�I€Dˆ#Ø€ÝŒ7�=Š=˜Ñ!Ô!ð 	%ØˆGˆGå”g—o’o gÑ.Ô.ˆGØ�n ˆGå	„w‡}‚}�WÑÔð 7Ý”'—,’,˜w¨­v©Ñ6Ô6ˆà—:’:˜n¨bÑ1Ô1€LØð ,Ý˜iÑ(Ô(ˆ
Ø˜\Ð)Ð)Ø×Ò 
Ñ+Ô+Ð+à
‡y‚y�{„{�fÒÐÝ�wð !¨¸lÐPSð !ð !Øð!ð !ð 	!ð €~Ý'¨¯	ª	©¬Ô4‰ˆ�Ø˜ÐÐØˆF�5‰Mà�JŠJ�w Ñ#Ô#€EØ€LØð ð ˆØ�uÐÐØ�LŠL˜ÑÔÐøð —’˜L¨%Ñ0Ô0€JØð BÝÐ@ÑAÔAÐAàˆV�W�I˜wð K°\Ø)¨s¸%ðKð KØCIðKð K€Fà
‡J‚J�L„L€LØ€Nr>   c                 ó†  — |                       d¦  «        sJ ‚|pd}|pd}|pt          j                             |¦  «        }t	          ||¬¦  «        }t          j                             |¦  «        rit          j                             | ¦  «        }	t          j                             |	¦  «        \  }
}t          j                             ||
t          z   ¦  «        }|pi }||d<   |€t          | ¦  «        }||d<   t          | f||dœ|¤Ž}|pg }|                     dg ¦  «        }d	}|D ]}||vr|                     |¦  «         Œ|                     d
g ¦  «        }|                     dd¦  «        rt          d¦  «        ‚|r|                     dd¦  «        }n|                     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   rR   Ú
output_dirNrL   ©r0   r   rC   )z-fwrapvrm   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(   ru   r¤   r   rš   rT   r,   r   r-   )Úpyxpathr    r0   r   r_   r“   rL   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Ô1€Gå˜g¨3Ð/Ñ/Ô/€Kå	„w‡}‚}�[Ñ!Ô!ð 7Ý”G×$Ò$ WÑ-Ô-ˆ	Ý”G×$Ò$ YÑ/Ô/‰	ˆˆcÝ”'—,’,˜w¨­v©Ñ6Ô6ˆà�˜R€IØ!€IˆlÑØ€}Ý˜WÑ%Ô%ˆØ€IˆgÑå$ WÐT°gÀ3ÐTÐTÈ)ÐTÐT€MàÐ% 2€LØ�JŠJ�w Ñ#Ô#€EØ3€LØð ð ˆØ�uÐÐØ�LŠL˜ÑÔÐøà�jŠj˜ BÑ'Ô'€Gà‡z‚zÐ# UÑ+Ô+ð NÝÐLÑMÔMÐMð ð 'Ø�jŠj˜ Ñ(Ô(ˆˆà�jŠj˜ Ñ&Ô&ˆå�=ð ¨'°sØ ,°E¸sØ"¨4Àðð ð ðð ð r>   c                 óÂ   — | D ][}t           j                             |¦  «        \  }}|                     ¦   «         }|t          v rt          |         d         |k    r dS Œ\dS )Nr   TF)r"   r#   r(   rH   r¦   )ÚsrcsÚclsr’   r9   r:   Úkeys         r<   Ú_any_Xr¸   ð  se   € Øð ð ˆÝ”G×$Ò$ SÑ)Ô)‰	ˆˆcØ�iŠi‰kŒkˆØÕ#Ð#Ð#Ý  Ô% aÔ(¨CÒ/Ð/Ø�t�tøØˆ5r>   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>   r   c           	      ó   — |€Ht           j                             t           j                             | d         ¦  «        ¦  «        d         }|pi }|pi }	 t	          t           j                             ||¦  «        | ¦  «        }n{# t          $ rn t          t          t          t          | ¦  «        ¦  «        f||dœ|¤Ž}t          |f|t          | ¦  «        t          | ¦  «        |dœ|¤Ž}t	          |¦  «        }Y nw xY w|S )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.
    NrO   r   r¬   )r   rY   rL   rZ   )r"   r#   r(   r)   r   ru   ÚImportErrorr=   ÚlistÚmapr   r~   r¼   r¾   )	ÚsourcesÚextnameÚ	build_dirÚcompile_kwargsÚlink_kwargsrZ   ÚmodÚobjsÚsos	            r<   Úcompile_link_import_py_extrË     s$  € ð: €Ý”'×"Ò"¥2¤7×#3Ò#3°G¸B´KÑ#@Ô#@ÑAÔAÀ!ÔDˆà#Ð) r€NØÐ# €Kð*Ý%¥b¤g§l¢l°9¸gÑ&FÔ&FÈÑPÔPˆˆøÝð *ð *ð *Ý�t¥C­°WÑ$=Ô$=Ñ>Ô>ð @È	Ø#,ð@ð @Ø0>ð@ð @ˆå˜ð \ )µ/À'Ñ2JÔ2JÝ+¨GÑ4Ô4Àð\ð \ØOZð\ð \ˆå% bÑ)Ô)ˆˆˆð*øøøð €Js   Á.B ÂA5C;Ã:C;c                 ó˜  — |pt          j        ¦   «         }t          j                             |¦  «        st          d|¦  «        ‚g }| D �]}\  }}t          j                             ||¦  «        }d}t          |                     d¦  «        ¦  «         	                    ¦   «         }t          j         
                    |¦  «        rnt          j         
                    |dz   ¦  «        r%t          |dz   ¦  «                             ¦   «         }n!t          |¦  «         	                    ¦   «         }||k    }|r}t          |d¦  «        5 }	|	                     |¦  «         d d d ¦  «         n# 1 swxY w Y   t          |dz   d¦  «        5 }	|	                     |¦  «         d d d ¦  «         n# 1 swxY w Y   |                     |¦  «         �Œ||fS )NzNon-existent directory: Túutf-8z.sha256Úwt)ÚtempfileÚmkdtempr"   r#   r$   r&   ru   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  s  € ØÐ/�XÔ-Ñ/Ô/€IÝŒ7�=Š=˜Ñ#Ô#ð =ÝÐ0°)Ñ<Ô<Ð<à€LØð "ñ "‰	ˆˆcÝŒw�|Š|˜I tÑ,Ô,ˆØˆÝ(¨¯ª°GÑ)<Ô)<Ñ=Ô=×GÒGÑIÔIˆÝŒ7�>Š>˜$ÑÔð 	6ÝŒw�~Š~˜d YÑ.Ñ/Ô/ð BÝ!% d¨YÑ&6Ñ!7Ô!7×!AÒ!AÑ!CÔ!C��å!/°Ñ!5Ô!5×!?Ò!?Ñ!AÔ!A�à$¨Ò5ˆGØð 	(Ý�d˜DÑ!Ô!ð  RØ—’˜‘”�ðð ð ñ ô ð ð ð ð ð ð øøøð ð ð ð å�d˜YÑ&¨Ñ-Ô-ð (°Ø—’˜Ñ'Ô'Ð'ð(ð (ð (ñ (ô (ð (ð (ð (ð (ð (ð (øøøð (ð (ð (ð (à×Ò˜DÑ!Ô!Ð!Ñ!Ø˜Ð"Ð"s$   ÅE&Å&E*	Å-E*	ÆF&Æ&F*	Æ-F*	c                 óV   — 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  sF   € õ* :¸'À9ÑMÔMÑ€L�)Ý
$ \Ð
QÐ
Q¸YÐ
QÈ&Ð
QÐ
Q€CØ˜Ð#€DØ�ˆ9Ðr>   c                 óÎ  — |r|�t          d¦  «        ‚	 t          | |¦  «        \  }}t          t          t	          t
          |¦  «        ¦  «        f||dœ|pi ¤Ž}t          |f|t          |¦  «        t          |¦  «        dœ|pi ¤Ž}t          j
        |gt          j        t          j        ¬¦  «        }|                     ¦   «         }	d„ |                     ¦   «         D ¦   «         \  }
}|r5t          j                             |¦  «        rt#          j        |¦  «         d}n<# |r5t          j                             |¦  «        rt#          j        |¦  «         d}w xY w|	|dœ}|
|f|fS )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   rY   rL   )ÚstdoutÚstderrc                 ó8   — g | ]}|                      d ¦  «        ‘ŒS )rÍ   )Údecode)Ú.0Útxts     r<   ú
<listcomp>z'compile_run_strings.<locals>.<listcomp>‹  s$   € ÐIÐIÐI°#˜#Ÿ*š* WÑ-Ô-ÐIÐIÐIr>   )Úexit_statusrÅ   )rI   rÜ   r=   rÁ   rÂ   r   r]   r¼   r¾   Ú
subprocessÚPopenÚPIPEÚwaitÚcommunicater"   r#   r$   r�   Úrmtree)rÃ   rÅ   ÚcleanrÆ   rÇ   rÖ   rÉ   ÚprogÚprè   rá   râ   rÞ   s                r<   Úcompile_run_stringsrò   e  sŸ  € ð6 ð f�Ð&ÝÐdÑeÔeÐeðÝ"=¸gÀyÑ"QÔ"QÑˆ�iÝ�t¥C­°\Ñ$BÔ$BÑCÔCð HÈYØ#,ðHð HØ1?Ð1EÀ2ðHð Hˆå�Dð N˜iÝ(¨Ñ6Ô6Ý'¨Ñ5Ô5ðNð Nà:EÐ:KÈðNð Nˆõ Ô˜d˜V­J¬OÅJÄOÐTÑTÔTˆØ—f’f‘h”hˆØIÐI¸¿º¹¼ÐIÑIÔI‰ˆ�àð 	•R”W—]’] 9Ñ-Ô-ð 	ÝŒM˜)Ñ$Ô$Ð$ØˆIøøð ð 	•R”W—]’] 9Ñ-Ô-ð 	ÝŒM˜)Ñ$Ô$Ð$ØˆIÐÐÐÐØ&°YÐ?Ð?€DØ�FÐ˜TÐ!Ð!s   •CD  Ä 9E)NNNFN)NFN)NFNNFFN)NNNFFN)NN)NNNF)NNNNNN)Nr   NNNrº   )NFNN)0r   r"   r�   ré   ro   rÏ   rq   Úpathlibr   Ú	sysconfigr   r   r   Úrunnersr   r	   r
   Úutilr   r   r   r   r   r   r   r   r   r   r   r9   r¤   rr   r'   r=   rM   r]   r~   rš   r¦   r-   r¥   r¸   r¼   r¾   rË   rÜ   rß   rò   © r>   r<   ú<module>rø      s,  ðØ €€€Ø 	€	€	€	Ø €€€Ø Ð Ð Ð Ø 
€
€
€
Ø €€€Ø €€€Ø Ð Ð Ð Ð Ð Ø ?Ð ?Ð ?Ð ?Ð ?Ð ?Ð ?Ð ?Ð ?Ð ?ðð ð ð ð ð ð ð ð ð ð
ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð „7ˆgÒÐØ€F€FØ„W�‚_€_Ø€F€Fà€H„MÐ'×.Ò.¨r¬wÑ7Ô7Ñ8Ô8Ð8Ø€Fð QVØ$(ð?ð ?ð ?ð ?ðD-ð -ð -ð -ð* 9=Ø7;ðEð Eð Eð EðP =AØ37ðTLð TLð TLð TLðn7ð 7ð 7ð 7ðv ˜DÐ
!Ø Ð%Ø Ð%Ø  $Ð
'Ø" DÐ)Ø" DÐ)Ø" DÐ)Ø" EÐ*Ø" GÐ,Ø" GÐ,ðð Ð ð?ð ?ð ?ð ?ðD 6:Ø59ðNð Nð Nð Nðbð ð ð/ð /ð /ð+ð +ð +ð UYØ<@ð+ð +ð +ð +ð\#ð #ð #ð4ð ð ð ð6,"ð ,"ð ,"ð ,"ð ,"ð ,"r>   