Ë
    :vžj­	  ã                   óB   — d Z ddlZddlZddlZddlZddlZd„ Zd„ Zd„ Zy)zQ
Utilities for getting information about Jupyter and the system it's running in.
é    Nc                 óª  — t         j                  }d}| }||k7  r©|}|j                  |j                  |d«      «      ro	 t	        j
                  g d¢t        j                  t        j                  | ¬«      }|j                  «       \  }}|r!d|j                  «       j                  d«      fS y|j                  |«      }||k7  rŒ©y# t        $ r d}Y ŒIw xY w)aÆ  Get short form of commit hash given directory `pkg_path`

    We get the commit hash from git if it's a repo.

    If this fail, we return a not-found placeholder tuple

    Parameters
    ----------
    pkg_path : str
        directory containing package
        only used for getting commit from active repo

    Returns
    -------
    hash_from : str
        Where we got the hash from - description
    hash_str : str
        short form of hash
    Nz.git)Úgitz	rev-parsez--shortÚHEAD)ÚstdoutÚstderrÚcwdÚ
repositoryÚascii)Ú r   )ÚosÚpathÚexistsÚjoinÚ
subprocessÚPopenÚPIPEÚcommunicateÚOSErrorÚstripÚdecodeÚdirname)Úpkg_pathÚpÚcur_pathÚpar_pathÚprocÚrepo_commitÚ_s          úh/workspace/moltex-experiments/.pixi/envs/default/lib/python3.12/site-packages/jupyter_server/_sysinfo.pyÚpkg_commit_hashr       sÒ   € ô, 	�‰€AØ€HØ€HØ
�hÒ
ØˆØ�8‰8�A—F‘F˜8 VÓ,Ô-ð	#Ü!×'Ñ'Ú;Ü%Ÿ?™?Ü%Ÿ?™?Ø ô	�ð "&×!1Ñ!1Ó!3‘�˜Qñ Ø# [×%6Ñ%6Ó%8×%?Ñ%?ÀÓ%HÐHÐHàØ—9‘9˜XÓ&ˆð% �hÓ
ð( øô ò #Ø"’ð#ús   ¾A
C ÃCÃCc           
      óæ   — t        | «      \  }}t        j                  | ||t        j                  t        j
                  t        j                  t        j                  «       t        j                  dœ	S )zïReturn dict describing the context of this package

    Parameters
    ----------
    pkg_path : str
        path containing __init__.py for package

    Returns
    -------
    context : dict
        with named parameters of interest
    )	Újupyter_server_versionÚjupyter_server_pathÚcommit_sourceÚcommit_hashÚsys_versionÚsys_executableÚsys_platformÚplatformÚos_name)	r    Újupyter_serverÚ__version__ÚsysÚversionÚ
executabler)   r   Úname)r   ÚsrcÚhshs      r   Úpkg_infor3   ?   sV   € ô ˜xÓ(�H€Cˆä"0×"<Ñ"<Ø'ØØÜ—{‘{ÜŸ.™.ÜŸ™Ü×%Ñ%Ó'Ü—7‘7ñ
ð 
ó    c            	      óÐ   — t         j                  } | j                  | j                  | j	                  | j                  t        j                  «      «      «      «      }t        |«      S )z5Return useful information about the system as a dict.)	r   r   Úrealpathr   Úabspathr   r+   Ú__file__r3   )r   r   s     r   Úget_sys_infor9   Z   sD   € ä
�‰€AØ�:‰:�a—i‘i §	¡	¨!¯&©&´×1HÑ1HÓ*IÓ JÓKÓL€DÜ�D‹>Ðr4   )	Ú__doc__r   r)   r   r-   r+   r    r3   r9   © r4   r   Ú<module>r<      s+   ðñó 
Û Û Û 
ã ò-ò`ó6r4   