a
    6Rî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                   @   s0   e Zd ZU dZeed< 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.
    ÚdistributionN)Úreturnc                 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ç  é
   é   )Zsee_urlZdue_dateÚegg_info)r   ÚemitÚrun_commandÚorigr   Úrun)Úself© r   úR/opt/python-3.9.24/usr/lib/python3.9/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)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   Ú__annotations__r   r   r   r   r   r   r      s   
r   )Údistr   Úwarningsr   Zdistutils.command.bdist_rpmÚcommandr   r   r   r   r   r   Ú<module>   s   