
    ^(j                     x    d dl mZ d dlZd dlZd dlZ ee      j                  d   dz  Zd Zde	de
fdZi Zd	 Zy)
    )PathN   zrequirements.txtc                      d} t         j                  j                  rd} dt         j                   d|  dt         dj                         S )z9The warning message to display when a package is missing. z-s z>
Please install the updated requirements.txt file by running:
 z-m pip install -r zb
If you are on the portable package you can run: update\update_comfyui.bat to solve this problem.
)sysflagsno_user_site
executablerequirements_pathstrip)extras    </Users/danicosta/Desktop/Flux2/ComfyUI/utils/install_util.py get_missing_requirements_messager   
   sQ     E
yy %*+<*= > 
EG	    versionreturnc                 D    d}t        t        j                  ||             S )z@Validate if a string is a valid semantic version (X.Y.Z format).z^(\d+)\.(\d+)\.(\d+)$)boolrematch)r   patterns     r   is_valid_versionr      s    &G'*++r   c                  b   t        t              dkD  rt        j                         S t        } 	 t        t        dd      5 }|D ]y  }|j                         j                  dd      }|j                  d      }t        |      dk(  sC|d   }t        |      st        j                  d	|d    d
|        r|| |d   <   { 	 d d d        | j                         S # 1 sw Y   xY w# t        $ r t        j                  d       Y y t        $ r"}t        j                  d|        Y d }~y d }~ww xY w)Nr   rzutf-8)encodingz>=z==   zInvalid version format for z in requirements.txt: zrequirements.txt not found.z Error reading requirements.txt: )lenPACKAGE_VERSIONScopyopenr   r   replacesplitr   loggingdebugFileNotFoundErrorerror	Exception)outflinesversion_stres         r   get_required_packages_versionsr0      s   
q $$&&
C#S7;qzz|++D$7JJt$q6Q;"#B%K+K8(CAaD6I_`k_l&mn  +C!I  < xxz <;  34 8<=s<   C$  AC9C C$ C!C$ $D.D.D))D.)pathlibr   r   r%   r   __file__parentsr   r   strr   r   r    r0    r   r   <module>r6      sS     
  	 N**1-0BB 
,c ,d ,  r   