
    fTh                         S r SSKrSSKrSSKrSSKrSSKJr  SSKJ	r	  \R                  \R                  \R                  \R                  \R                  \R                  S.rS rSS\S\\   S	S4S
 jjrS rg)z-
Utilities for working with package versions
    N)Optional)version)<z<===z!=z>=>c                     Ub  Uc  [        SU SU SU SU S3	5      e[        U    " [        R                  " U5      [        R                  " U5      5      (       d  [	        U SU SU SU 35      eg )NzUnable to compare versions for z: need=z found=z). This is unusual. Consider reinstalling .z@ is required for a normal functioning of this module, but found r   )
ValueErroropsr   parseImportError)opgot_verwant_verrequirementpkghints         S/var/www/auris/envauris/lib/python3.13/site-packages/transformers/utils/versions.py_compare_versionsr   %   s    (*-k]'(7SZR[ \ E$
 	
 r77==)7==+BCCm[\_[``bcjbkklmqlrs
 	
 D    r   r   returnc           	         Ub  SU 3OSn[         R                  " SU 5      (       a  U SSpCnO[         R                  " SU 5      nU(       d  [        SU  35      eUS   u  p&UR	                  S5      n0 nU Hr  n	[         R                  " S	U	5      nU(       d  [        SU  35      eUS   u  p4XHU'   U[
        ;  d  MF  [        U  S
[        [
        R                  5       5       SU 35      e   US:X  ac  SR                  [        R                  SS  V
s/ s H  n
[        U
5      PM     sn
5      nWR                  5        H  u  p4[        X;X@X!5        M     g [        R                  R!                  U5      nWb'  WR                  5        H  u  p4[        X;X@X!5        M     ggs  sn
f ! [        R                  R"                   a&    [        R                  R#                  SU  SU 35      ef = f)a  
Perform a runtime check of the dependency versions, using the exact same syntax used by pip.

The installed module version comes from the *site-packages* dir via *importlib.metadata*.

Args:
    requirement (`str`): pip style definition, e.g.,  "tokenizers==0.9.4", "tqdm>=4.27", "numpy"
    hint (`str`, *optional*): what suggestion to print in case of requirements not being met

Example:

```python
require_version("pandas>1.1.2")
require_version("numpy>1.18.5", "this is important to have for whatever reason")
```N
 z^[\w_\-\d]+$z^([^!=<>\s]+)([\s!=<>]{1,2}.+)zgrequirement needs to be in the pip package format, .e.g., package_a==1.23, or package_b>=1.23, but got r   ,z^([\s!=<>]{1,2})(.+)z: need one of z
, but got pythonr	      zThe 'zB' distribution was not found and is required by this application. )rematchfindallr
   splitr   listkeysjoinsysversion_infostritemsr   	importlibmetadatar   PackageNotFoundError)r   r   r   r   r   r   	want_full
want_rangewantedwxr   s               r   require_versionr1   1   s   " *Rv;D 
xx--'t

<kJ#}&  q__S)
AJJ6:E   +}.  !8LB!2J} K=tCHHJ?O>PPZ[]Z^!_``  h((C,<,<Ra,@A,@qCF,@AB"LLNLBb8#L +
$$,,S1 "LLNLBb8#L +  B 22 
  55K= bcgbhi
 	

s   FF$ $AG(c                     Sn[        X5      $ )zCrequire_version wrapper which emits a core-specific hint on failurez_Try: `pip install transformers -U` or `pip install -e '.[dev]'` if you're working with git main)r1   )r   r   s     r   require_version_corer3   r   s    lD;--r   )N)__doc__importlib.metadatar)   operatorr   r%   typingr   	packagingr   ltleeqnegegtr   r   r'   r1   r3    r   r   <module>r@      s~      	 
   

++
++
++
++		
>M >MHSM >MT >MB.r   