3
Ävhä ã @ s" d dl jjZG dd„ dejƒZdS )é Nc @ s e Zd ZdZdd„ Zdd„ ZdS )Ú bdist_rpmaf
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.
3. Replace dash with underscore in the version numbers for better RPM
compatibility.
c C s | j dƒ tjj| ƒ d S )NZegg_info)Zrun_commandÚorigr Úrun)Úself© r ú/usr/lib/python3.6/bdist_rpm.pyr s
z
bdist_rpm.runc sl | j jƒ }|jddƒ}tjj| ƒ}d| ‰ d| ‰‡ ‡fdd„|D ƒ}|jˆƒd }d| }|j||ƒ |S )Nú-Ú_z%define version c s0 g | ](}|j d dƒj ddƒj ddƒj ˆ ˆƒ‘qS )zSource0: %{name}-%{version}.tarz)Source0: %{name}-%{unmangled_version}.tarzsetup.py install z5setup.py install --single-version-externally-managed z%setupz&%setup -n %{name}-%{unmangled_version})Úreplace)Ú.0Úline)Úline23Úline24r r ú