
    +j                     |    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dS )
    )PathN   zrequirements.txtc                      d} t           j        j        rd} dt           j         d|  dt           d                                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    2/home/wildlama/comfy/ComfyUI/utils/install_util.py get_missing_requirements_messager   
   s^     E
y   +<   
EGG	    versionreturnc                 J    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                     t          t                    dk    rt                                          S t          } 	 t          t          dd          5 }|D ]}|                                                    dd          }|                    d          }t          |          dk    rC|d         }t          |          s!t          j
        d	|d          d
|            || |d         <   	 d d d            n# 1 swxY w Y   |                                 S # t          $ r t          j        d           Y d S t          $ r"}t          j        d|            Y d }~d S 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7JJt$$q66Q;;"#B%K+K88 !&mAaD&m&m`k&m&mnnn  +C!I,		, 		, 		, 		, 		, 		, 		, 		, 		, 		, 		, 		, 		, 		, 		, xxzz   3444tt   <<<===tttttsB   D BC7+D 7C;;D >C;?D E"7	E" EE")pathlibr   r   r%   r   __file__parentsr   r   strr   r   r    r0    r   r   <module>r6      s          



  				 DNN*1-0BB 
 
 
,c ,d , , , ,      r   