
    ʨsg
                     l    d Z ddlZddlZddlZddlmZ ddlmZ ddlm	Z	  G d de	      Z
d	 Zd
 Zd Zy)z
distutils.command.install_egg_info

Implements the Distutils 'install_egg_info' command, for installing
a package's PKG-INFO metadata.
    N   )dir_util)log)Commandc                   B    e Zd ZdZdZdgZd Zed        Zd Z	d Z
d Zy	)
install_egg_infoz)Install an .egg-info file for the packagez8Install package's PKG-INFO metadata as an .egg-info file)zinstall-dir=dzdirectory to install toc                     d | _         y N)install_dirselfs    a/var/www/html/venv/lib/python3.12/site-packages/setuptools/_distutils/command/install_egg_info.pyinitialize_optionsz#install_egg_info.initialize_options   s
        c                     dt        t        | j                  j                                     t        t	        | j                  j                                     gt        j                  dd z  S )z_
        Allow basename to be overridden by child class.
        Ref pypa/distutils#2.
        z%s-%s-py%d.%d.egg-infoNr   )to_filename	safe_namedistributionget_namesafe_versionget_versionsysversion_infor   s    r   basenamezinstall_egg_info.basename   se     (	$"3"3"<"<">?@T%6%6%B%B%DEF+
 bq!+
 
 	
r   c                     | j                  dd       t        j                  j                  | j                  | j
                        | _        | j                  g| _        y )Ninstall_lib)r   r   )set_undefined_optionsospathjoinr   r   targetoutputsr   s    r   finalize_optionsz!install_egg_info.finalize_options(   s@    ""=2PQggll4#3#3T]]C}r   c                    | j                   }t        j                  j                  |      rAt        j                  j	                  |      s"t        j                  || j                         nt        j                  j                  |      r0| j                  t        j                  | j                   fd|z          nbt        j                  j                  | j                        s9| j                  t        j                  | j                  fd| j                  z          t        j                  d|       | j                  s=t        |dd      5 }| j                   j"                  j%                  |       d d d        y y # 1 sw Y   y xY w)N)dry_runz	Removing z	Creating z
Writing %swzUTF-8)encoding)r"   r   r    isdirislinkr   remove_treer&   existsexecuteunlinkr   makedirsr   infoopenr   metadatawrite_pkg_file)r   r"   fs      r   runzinstall_egg_info.run-   s   77== )?  >WW^^F#LLT[[NK&4HIt//0LLd..0+@P@P2P 	v&||fcG4 =!!**99!<= = = =s   &E>>Fc                     | j                   S r   )r#   r   s    r   get_outputszinstall_egg_info.get_outputs<   s    ||r   N)__name__
__module____qualname____doc__descriptionuser_optionsr   propertyr   r$   r5   r7    r   r   r   r      s<    3LK8L  	
 	
%
=r   r   c                 0    t        j                  dd|       S )zConvert an arbitrary string to a standard distribution name

    Any runs of non-alphanumeric/. characters are replaced with a single '-'.
    [^A-Za-z0-9.]+-)resubnames    r   r   r   E   s    
 66"C..r   c                 T    | j                  dd      } t        j                  dd|       S )zConvert an arbitrary string to a standard version string

    Spaces become dots, and all other non-alphanumeric characters become
    dashes, with runs of multiple dashes condensed to a single dash.
     .rA   rB   )replacerC   rD   )versions    r   r   r   M   s(     ooc3'G66"C11r   c                 &    | j                  dd      S )z|Convert a project or version name to its filename-escaped form

    Any '-' characters are currently replaced with '_'.
    rB   _)rJ   rE   s    r   r   r   W   s    
 <<S!!r   )r;   r   rC   r    r   _logr   cmdr   r   r   r   r   r?   r   r   <module>rQ      s:    
 	 
   ,w ,h/2"r   