ã“Reäã@s/ddljjZGdd„dejƒZdS)éNc@s.eZdZdZdd„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. cCs!|jdƒtjj|ƒdS)NÚegg_info)Ú run_commandÚorigrÚrun)Úself©rú’/builddir/build/BUILDROOT/alt-python35-setuptools-36.3.0-4.el8.x86_64/opt/alt/python35/lib/python3.5/site-packages/setuptools/command/bdist_rpm.pyrs z bdist_rpm.runcs”|jjƒ}|jddƒ}tjj|ƒ}d|‰d|‰‡‡fdd†|Dƒ}|jˆƒd}d|}|j||ƒ|S)Nú-Ú_z%define version csFg|]<}|jddƒjddƒjddƒ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Úline24rr ú s z-bdist_rpm._make_spec_file..éz%define unmangled_version )Ú distributionÚ get_versionr rrÚ_make_spec_fileÚindexÚinsert)rÚversionZ rpmversionÚspecZ insert_locZunmangled_versionr)rrr rs    zbdist_rpm._make_spec_fileN)Ú__name__Ú __module__Ú __qualname__Ú__doc__rrrrrr rs  r)Zdistutils.command.bdist_rpmÚcommandrrrrrr Ús