o
    LK&h                     @   s@   d dl mZ d dlmZ ddlm  mZ G dd dejZdS )   )Distribution)SetuptoolsDeprecationWarning    Nc                   @   s,   e Zd ZU dZeed< d	ddZdd ZdS )
	bdist_rpma  
    Override the default bdist_rpm behavior to do the following:

    1. Run egg_info to ensure the name and version are properly calculated.
    2. Always run 'install' using --single-version-externally-managed to
       disable eggs in RPM distributions.
    distributionreturnNc                 C   s,   t jddddd | d tj|  d S )NzDeprecated commandz
            bdist_rpm is deprecated and will be removed in a future version.
            Use bdist_wheel (wheel packages) instead.
            z.https://github.com/pypa/setuptools/issues/1988)i  
      )see_urldue_dateegg_info)r   emitrun_commandorigr   run)self r   O/var/www/html/venv/lib/python3.10/site-packages/setuptools/command/bdist_rpm.pyr      s   
zbdist_rpm.runc                 C   s   t j| }dd |D S )Nc                 S   s    g | ]}| d d ddqS )zsetup.py install z5setup.py install --single-version-externally-managed z%setupz&%setup -n %{name}-%{unmangled_version})replace).0liner   r   r   
<listcomp>$   s    z-bdist_rpm._make_spec_file.<locals>.<listcomp>)r   r   _make_spec_file)r   specr   r   r   r   "   s   zbdist_rpm._make_spec_file)r   N)__name__
__module____qualname____doc__r   __annotations__r   r   r   r   r   r   r      s
   
 
r   )distr   warningsr   distutils.command.bdist_rpmcommandr   r   r   r   r   r   <module>   s    