+
    
þÎj£!  ã                   óú   € ^ RI Ht ^ RIHt ^ RIt^ RIt^ RIt^ RIt^ RIH	t	 R t
 ! R R]4      t ! R R	]4      tRR
 ltR tRR ltRR lt]! RR4      t]! RR4      tRR ltRR ltR tR tRR ltR tR tR# )é    )Ú
namedtuple)Úsha256N)ÚXFAILc                 óŒ   € \         P                  P                  4       R 8X  g   \        P                  R8X  d   \        V 4      # V # )ÚdarwinÚnt)ÚsysÚplatformÚlowerÚosÚnamer   )Úfuncs   &ÚW/opt/data/home/.local/lib/python3.14/site-packages/sympy/utilities/_compilation/util.pyÚ	may_xfailr      s2   € Ü
‡|�|×ÑÓ˜xÔ'¬2¯7©7°d¬?ô �T‹{Ðàˆó    c                   ó   € ] tR t^tRtR# )ÚCompilerNotFoundError© N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__static_attributes__r   r   r   r   r      s   † Ûr   r   c                   ó   € ] tR t^tRtRtR# )ÚCompileErrorz2Failure to compile one or more C/C++ source files.r   N)r   r   r   r   Ú__doc__r   r   r   r   r   r      s   † Ý<r   r   c                óP  € \         P                  P                  V 4      '       d   V # \         P                  P                  V4      '       g    \         P                  P                  V4      p\         P                  P                  \         P                  P	                  W4      4      # )z€Returns the absolute path.

Parameters
==========

path : str
    (relative) path.
cwd : str
    Path to root of relative path.
)r   ÚpathÚisabsÚabspathÚjoin)r   Úcwds   &&r   Úget_abspathr#      sf   € ô 
‡w�w‡}�}�T×ÒØˆä�w‰w�}‰}˜S×!Ò!Ü—'‘'—/‘/ #Ó&ˆCÜ�w‰w�‰Ü�G‰G�L‰L˜Ó#ó
ð 	
r   c                óð  € V R,          R8X  d$   \         P                  P                  V RR 4      pM\         P                  P                  V 4      p\        V4      ^ 8”  d1   \         P                  P	                  V4      '       g   \        V4       \         P                  P	                  V 4      '       g   \         P                  ! V R4       R# \         P                  P                  V 4      '       g   Q hR# )z1Create directories (equivalent of ``mkdir -p``). Ú/Niÿ  éÿÿÿÿ)r   r   ÚdirnameÚlenÚexistsÚ	make_dirsÚmkdirÚisdir)r   Úparents   & r   r*   r*   2   s—   € àˆB…x�3„Ü—‘—‘  c r Ó+‰ä—‘—‘ Ó&ˆä
ˆ6ƒ{�Q„Ü�w‰w�~‰~˜f×%Ò%Ü�fÔä�7‰7�>‰>˜$×ÒÜ
�Š��uÖä�w‰w�}‰}˜T×"Ò"Ð"Ò"r   c                ó0  € T;'       g    Rp\        WR7      p \        WR7      p\        P                  P                  V 4      '       g   R# \        P                  P	                  V4      R,
          \        P                  P	                  V 4      8¼  d   R# R# )a7  
Investigate if path is non-existent or older than provided reference
path.

Parameters
==========
path: string
    path to path which might be missing or too old
other_path: string
    reference path
cwd: string
    working directory (root of relative paths)

Returns
=======
True if path is older or missing.
Ú.©r"   Tg�íµ ÷Æ°>F)r#   r   r   r)   Úgetmtime)r   Ú
other_pathr"   s   &&&r   Úmissing_or_other_newerr3   B   sj   € ð$ �*ˆ*�€CÜ�tÔ%€DÜ˜ZÔ1€JÜ�7‰7�>‰>˜$×ÒÙÜ	‡w�w×Ñ˜
Ó# dÕ*¬b¯g©g×.>Ñ.>¸tÓ.DÔDáÙr   c                ó8  € V'       d‰   \         P                  P                  V 4      '       g    \         P                  P                  W@4      p \         P                  P                  V4      '       g    \         P                  P                  WA4      p\         P                  P	                  V 4      '       g   \        RP                  V 4      4      hV'       d   VR,          R8X  g
   VR,           pML\         P                  P	                  V4      '       d(   \         P                  P                  V4      '       d   RpV'       dB   Tp\         P                  P                  V 4      p\         P                  P                  Wx4      pM\         P                  P                  V4      p\         P                  P	                  V4      '       g    V'       d   \        V4       M\        R4      hV'       d   \        W4      '       g   R# \         P                  P                  V4      '       d?   \         P                  P                  \         P                  P                  V4      VR7      p\        P                   ! W4       V'       d   \        P"                  ! W4       V# )aK  Variation of ``shutil.copy`` with extra options.

Parameters
==========

src : str
    Path to source file.
dst : str
    Path to destination.
only_update : bool
    Only copy if source is newer than destination
    (returns None if it was newer), default: ``False``.
copystat : bool
    See ``shutil.copystat``. default: ``True``.
cwd : str
    Path to working directory (root of relative paths).
dest_is_dir : bool
    Ensures that dst is treated as a directory. default: ``False``
create_dest_dirs : bool
    Creates directories if needed.

Returns
=======

Path to the copied file.

zSource: `{}` does not existr%   Tz You must create directory first.Nr0   r&   )r   r   r   r!   r)   ÚFileNotFoundErrorÚformatr,   Úbasenamer'   r*   r3   Úislinkr    ÚrealpathÚshutilÚcopyÚcopystat)	ÚsrcÚdstÚonly_updater<   r"   Údest_is_dirÚcreate_dest_dirsÚdest_dirÚ
dest_fnames	   &&&&&&&  r   r;   r;   ^   s’  € ÷: Ü�w‰w�}‰}˜S×!Ò!Ü—'‘'—,‘,˜sÓ(ˆCÜ�w‰w�}‰}˜S×!Ò!Ü—'‘'—,‘,˜sÓ(ˆCä�7‰7�>‰>˜#×ÒÜÐ =× DÑ DÀSÓ IÓJÐJ÷ Ø�2�w˜#Œ~Ø�c•'ˆCøä�7‰7�>‰>˜#×Ò¤2§7¡7§=¡=°×#5Ò#5ØˆKçØˆÜ—W‘W×%Ñ% cÓ*ˆ
Ü�g‰g�l‰l˜8Ó0‰ä—7‘7—?‘? 3Ó'ˆä�7‰7�>‰>˜(×#Ò#ßÜ�hÕä#Ð$FÓGÐGçÜ% c×/Ò/Ùä	‡w�w‡~�~�c×ÒÜ�g‰g�o‰oœbŸg™g×.Ñ.¨sÓ3¸ˆoÓ=ˆä
‡K‚K�ÔßÜ�Š˜Ô!à€Jr   ÚGlobÚpathnameÚArbitraryDepthGlobÚfilenamec                 ó   € Ve   Rp. p\         P                  ! V4       F[  w  r4pV FO  p\        P                  ! W`4      '       g   K!  VP                  \         P                  P                  W64      4       KQ  	  K]  	  V# )Nr/   )r   ÚwalkÚfnmatchÚappendr   r!   )Úfilename_globr"   ÚglobbedÚrootÚdirsÚ	filenamesÚfns   &&     r   Úglob_at_depthrR   ª   sa   € Ø
‚ØˆØ€GÜ!#§¢¨¦Ñˆ�IÛˆBä�Š˜r×1Ô1Ø—‘œrŸw™wŸ|™|¨DÓ5Ö6ó ñ ".ð
 €Nr   c                óÖ   aaa€ \        4       o\        V R4      ;_uu_ 4       o\        VVV3R lR4       F  pSP                  V4       K  	  RRR4       S#   + '       g   i     S# ; i)a5  Computes the SHA256 hash of a file.

Parameters
==========

path : string
    Path to file to compute hash of.
nblocks : int
    Number of blocks to read per iteration.

Returns
=======

hashlib sha256 hash object. Use ``.digest()`` or ``.hexdigest()``
on returned object to get binary or hex encoded string.
Úrbc                  óH   <€ S P                  SSP                  ,          4      # ©N)ÚreadÚ
block_size)ÚfÚnblocksÚshs   €€€r   Ú<lambda>Ú sha256_of_file.<locals>.<lambda>È   s   ø€  !§&¡&¨°·±Õ)>Ô"?r   r   N)r   ÚopenÚiterÚupdate)r   rZ   ÚchunkrY   r[   s   &f @@r   Úsha256_of_filerb   µ   sV   ú€ ô" 
‹€BÜ	ˆd�D×	Ô	˜QÜÖ?ÀÖEˆEØ�I‰I�eÖñ F÷ 
ð €I÷ 
Ö	ð €Iús   ¢+AÁA(	c                ó<   € \        4       pVP                  V 4       V# )z&Computes the SHA256 hash of a string. )r   r`   )Ústringr[   s   & r   Úsha256_of_stringre   Í   s   € ä	‹€BØ‡I�IˆfÔØ€Ir   c                ó  € \        V 4      ;_uu_ 4       pV FÉ  pVP                  R4      '       g   K  RV9   g   K%  VP                  R4      p\        V4      ^8w  d   KH  Vw  rEVP	                  4       P                  4       R,          P                  4       R8X  g   K†  VP	                  4       P                  4       ^ ,          P                  4       R8X  g   KÀ   RRR4       R# 	  RRR4       R#   + '       g   i     R# ; i)	z£
Inspect a Cython source file (.pyx) and look for comment line like:

# distutils: language = c++

Returns True if such a file is present in the file, else False.
Ú#Ú=Úlanguagezc++NTFr&   )r^   Ú
startswithÚsplitr(   Ústripr   )r   ÚfhÚlineÚsplittedÚlhsÚrhss   &     r   Úpyx_is_cplusrr   Ô   sº   € ô 
ˆd�Œ�rÛˆDØ�‰˜s×#Ô#¨¨t®ØŸ:™: c›?�Ü�x“= AÔ%ÙØ#‘�Ø—9‘9“;×$Ñ$Ó& rÕ*×0Ñ0Ó2°jÖ@Ø—y‘y“{×(Ñ(Ó*¨1Õ-×3Ñ3Ó5¸Ö>Ø#'÷ 
‰Ù÷ 
ñ ÷ 
Žñ ús(   ”C.³C.¼AC.Â5C.ÃC.Ã"C.Ã.C?	c                óÞ  € \         P                  P                  V 4      w  r#\         P                  P                  V4      w  r4VP                  R4      ^ ,          p\        P
                  ^ ,          ^8X  dŒ   ^ RIHpHp V! W2.4      w  rppV'       de   V F^  p	\         P                  P                  V 4      \         P                  P                  V	4      8  g   KF  \        RP                  W�4      4      h	  V! W7W4      p
V
# ^ RIpVP                  P                  W04      pVf   \        RV ,          4      hVP                  P                  V4      p
VP                   P#                  V
4       V
# )aÛ  Imports Python extension (from shared object file)

Provide a list of paths in `only_if_newer_than` to check
timestamps of dependencies. import_ raises an ImportError
if any is newer.

Word of warning: The OS may cache shared objects which makes
reimporting same path of an shared object file very problematic.

It will not detect the new time stamp, nor new checksum, but will
instead silently use old module. Use unique names for this reason.

Parameters
==========

filename : str
    Path to shared object.
only_if_newer_than : iterable of strings
    Paths to dependencies of the shared object.

Raises
======

``ImportError`` if any of the files specified in ``only_if_newer_than`` are newer
than the file given by filename.
r/   )Úfind_moduleÚload_modulez{} is newer than {}NzFailed to import: '%s')r   r   rk   Úsplitextr	   Úversion_infoÚimprt   ru   r1   ÚImportErrorr6   Úimportlib.utilÚutilÚspec_from_file_locationÚmodule_from_specÚloaderÚexec_module)rG   Úonly_if_newer_thanr   r   Úextrt   ru   ÚfobjÚdataÚdepÚmodÚ	importlibÚspecs   &&           r   Úimport_module_from_filerˆ   è   s   € ô6 —‘—‘˜xÓ(�J€DÜ—‘× Ñ  Ó&�I€DØ�:‰:�c‹?˜1Õ€DÜ
×Ñ˜Õ˜aÔß0Ù*¨4°Ó8Ñˆ˜ßÛ)�Ü—7‘7×#Ñ# HÓ-´·±×0@Ñ0@ÀÓ0EÖEÜ%Ð&;×&BÑ&BÀ3Ó&QÓRÐRñ *ñ ˜$ hÓ5ˆð €Jó 	Ø�~‰~×5Ñ5°dÓEˆØŠ<ÜÐ6¸ÕAÓBÐBØ�n‰n×-Ñ-¨dÓ3ˆØ�‰×Ñ Ô$Ø€Jr   c                ó’   € ^ RI Hp V  F"  pV! V4      pV'       g   K  V'       g   K  W#3u # 	  \        RP                  V 4      4      h)a  Finds binary first matching name among candidates.

Calls ``which`` from shutils for provided candidates and returns
first hit.

Parameters
==========

candidates : iterable of str
    Names of candidate commands

Raises
======

CompilerNotFoundError if no candidates match.
)Úwhichz$No binary located for candidates: {})r:   rŠ   r   r6   )Ú
candidatesrŠ   ÚcÚbinary_paths   &   r   Úfind_binary_of_commandrŽ     sD   € õ" ÛˆÙ˜A“hˆß‰1—‘Ø�>Ò!ñ ô
  Ð F× MÑ MÈjÓ YÓ
ZÐZr   c                óN   € . pV  F  pW!9  g   K  VP                  V4       K  	  V# )z(Uniquify a list (skip duplicate items). )rK   )ÚlÚresultÚxs   &  r   Úunique_listr“   2  s)   € à€FÛˆØŽ?Ø�M‰M˜!Öñ ð €Mr   )r/   rV   )FTNFF)é€   )Úcollectionsr   Úhashlibr   r   r:   r	   rJ   Úsympy.testing.pytestr   r   r5   r   Ú	Exceptionr   r#   r*   r3   r;   rD   rF   rR   rb   re   rr   rˆ   rŽ   r“   r   r   r   Ú<module>r™      s�   ðÝ "Ý Û 	Û Û 
Û å &òô	Ð-ô 	ô=�Iô =ô
ò*#ô ô8GñR �&˜*Ó%€ÙÐ 4°jÓAÐ ô	ôò0òô(-ò`[ô4r   