
    :[g
                     T    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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__     J/var/www/html/bid-api/venv/lib/python3.12/site-packages/xgboost/libpath.pyr   r   
   s    3r   r   returnc                     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 }}|sdt         j                   j#                  dd      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OS400XGBOOST_BUILD_DOCFz5https://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.)ospathdirnameabspath
expanduser__file__joinpardirsysbase_prefixplatformextend
startswithsystemexistsisfileenvirongetr   )	curr_pathdll_pathplib_pathlinkmsgs         r   find_lib_pathr2      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EHqBGGLLM2HE		 	 !C	D>FGhBGGLLO4hG		!AIJABGGLL$67J		!?GHx!BGGLL$45xHG#>FGhBGGLLO4hG#O8arww~~a'8RWW^^A=N8HO BJJNN+>FF({{8$& 00 	
 $$ oo   )	) 	 %S))O9 FGJHGOs0   ('Q5'Q 6'Q%7'Q*;'Q/($Q4Q4-Q4)
r	   r   r$   r"   typingr   	Exceptionr   strr2   r
   r   r   <module>r6      s0    5 	  
 4Y 4<tCy <r   