
    ^ii                     `    d Z ddlZddlZddlZddlmZ  G d de      ZdefdZ	dee
   fdZy)	z/Find the path to xgboost dynamic library files.    N)Listc                       e Zd ZdZy)XGBoostLibraryNotFoundz)Error thrown by when xgboost is not foundN)__name__
__module____qualname____doc__     P/var/www/html/hubwallet-dev/venv/lib/python3.12/site-packages/xgboost/libpath.pyr   r   
   s    3r   r   returnc                  T    t        t        j                  j                  dd            S )zP`XGBOOST_BUILD_DOC` is used by the sphinx conf.py to skip building the C++ code.XGBOOST_BUILD_DOCF)boolosenvirongetr
   r   r   is_sphinx_buildr      s    

2E:;;r   c                     t         j                  j                  t         j                  j                  t         j                  j	                  t
                          } t         j                  j                  | d      t         j                  j                  | t         j                  j                  t         j                  j                  d      t         j                  j                  t        j                  d      g}t        j                  dk(  r|j                  t         j                  j                  t        j                  d      t         j                  j                  t        j                  d      t         j                  j                  t        j                  dd      t         j                  j                  t        j                  dd      t         j                  j                  t        j                  dd      t         j                  j                  t        j                  ddd      t         j                  j                  t        j                  ddd      g       |D cg c]"  }t         j                  j                  |d      $ }}nt        j                  j                  d      r.|D cg c]"  }t         j                  j                  |d      $ }}nt        j                  d	k(  r.|D cg c]"  }t         j                  j                  |d
      $ }}n@t        j                  dk(  r-|D cg c]"  }t         j                  j                  |d      $ }}t        j                         dk(  r-|D cg c]"  }t         j                  j                  |d      $ }}|D cg c]D  }t         j                  j                  |      s#t         j                  j                  |      sC|F }}|sNt!               sDd}ddj                  |      z   dz   | z   dz   t        j                  z   dz   |z   dz   }t#        |      |S c c}w c c}w c c}w c c}w c c}w c c}w )zFind the path to xgboost dynamic library files.

    Returns
    -------
    lib_path
       List of all found library path to xgboost
    libwin32binLibraryz	mingw-w64zxgboost.dll)linuxfreebsd
emscriptenzlibxgboost.sodarwinzlibxgboost.dylibcygwinzcygxgboost.dllOS400z5https://xgboost.readthedocs.io/en/stable/install.htmlzJCannot find XGBoost Library in the candidate path.  List of candidates:
- z
- z
XGBoost Python package path: z
sys.base_prefix: z
See: z for installing XGBoost.)r   pathdirnameabspath
expanduser__file__joinpardirsysbase_prefixplatformextend
startswithsystemexistsisfiler   r   )	curr_pathdll_pathplib_pathlinkmsgs         r   find_lib_pathr5      s    0B0B80L MNI 	Y&
YF 	S__e,H ||wS__e4S__i8S__i?S__i?S__iES__ieLS__ieL
	
 =EEqBGGLLM2EE		 	 !C	D>FGBGGLLO4GG		!AIJABGGLL$67JJ		!?GH!BGGLL$45HHG#>FGBGGLLO4GG#Oarww~~a'8RWW^^A=NOHOO-F({{8$& 00 	
 $$ oo   )	) 	 %S))O7 FGJHGOs0   ('Q5'Q
6'Q7'Q;'Q($QQ-Q)r	   r   r)   r'   typingr   	Exceptionr   r   r   strr5   r
   r   r   <module>r9      s<    5 	  
 4Y 4< <
;tCy ;r   