
    f3fi                         d 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	 dee
   dee
   fdZdd	d
ee
   ddfdZedk(  r e        yy)zQPrint information about the system and langchain packages for debugging purposes.    N)Sequence)metadatautilpackagesreturnc                    t               }| D ch c]  }|j                  dd       }}| D ]r  }	 t        j                  |      }|s|D ]R  }t        j                  d|      }|s|j                  d      }|j                  dd      |vsB|j                  |       T t t        |d       S c c}w # t        j                  $ r Y w xY w)z#Get any specified sub-dependencies.-_z^([a-zA-Z0-9_.-]+)   c                 "    | j                         S )N)lower)xs    U/var/www/auto_recruiter/arenv/lib/python3.12/site-packages/langchain_core/sys_info.py<lambda>z_get_sub_deps.<locals>.<lambda>!   s    !'')     )key)
setreplacer   requiresPackageNotFoundErrorrematchgroupaddsorted)r   sub_depspkgunderscored_packagesrequiredreqr   pkg_names           r   _get_sub_depsr"      s    uH=EFcCKKS1FF +	((-H  	+CHH2C8E ;;q>##C-5IILL*	++" ( 344' G
 ,, 		s   B/B44C
	C
 )additional_pkgsr$   c                 Z   ddg}t        j                         D cg c]  \  }}}|j                  d      s| }}}t        j                         D cg c]  \  }}}|j                  d      s| }}}t        t	        ||z   |z   t        |       z               }g d}t        |      D ]&  }||v s|j                  |       |gt        |      }( t        j                         t        j                         t        j                  d}	t                t        d       t        d       t        d	|	d
          t        d|	d          t        d|	d          t                t        d       t        d       g }
|D ]V  }	 t        j                  |      }||
j!                  |       -	 t#        j                  |      }|Ft        d| d|        X |
r5t                t        d       t        d       |
D ]  }t        d|         t%        |      }|rRt                t        d       t        d       |D ],  }	 t#        j                  |      }|t        d| d|        . yyc c}}w c c}}w # t        $ r d}Y w xY w# t        $ r d}Y w xY w# t        $ r d}Y Sw xY w)zPrint information about the environment for debugging purposes.

    Args:
        additional_pkgs: Additional packages to include in the output.
    	langserve	langsmith	langchain	langgraph)langchain_corer(   langchain_communityr'   )OS
OS VersionPython VersionzSystem Informationz------------------z> OS: r,   z> OS Version: r-   z> Python Version: r.   zPackage Informationz-------------------Nz> z: zOptional packages not installedz-------------------------------zOther Dependencies)pkgutiliter_modules
startswithr   r   listreversedremoveplatformsystemversionsysprintr   	find_spec	Exceptionappendr   r"   )r$   other_langchain_packagesr
   namelangchain_pkgslanggraph_pkgsall_packagesorder_byr   system_infonot_installedfound_packagepackage_versionsub_dependenciesdepdep_versions                   r   print_sys_inforJ   $   s    	   '335D!9UN 
  '335D!9UN  &' ?#$	
L SH! 6,$5$|"45L6 oo&&(++K
 
G	
	
	(K%&	
K56	
,< => 
G	
 	
 M 1	! NN3/M    %	#&..s3O
 &Bse2o./0#1& /0/0  	CBse*	 %\2"#"## 	1C#&..s3 &3%r+/0	1 QV  	! M	!  	#"O	#0  #"#sL   I.I.I40I4I:,JJ:JJJJJ*)J*__main__)__doc__r/   r5   r   r8   collections.abcr   	importlibr   r   strr2   r"   rJ   __name__r#   r   r   <module>rQ      sj    W   	 
 $ $5HSM 5d3i 52 8: `1x} `1d `1F z r   