ó Àfc@s/ddljjZdejfd„ƒYZdS(iÿÿÿÿNt bdist_rpmcBs eZdZd„Zd„ZRS(sf 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(Ntegg_info(t run_commandtorigRtrun(tself((s@/usr/lib/python2.7/site-packages/setuptools/command/bdist_rpm.pyRs c CsÁ|jjƒ}|jddƒ}tjj|ƒ}d|}d|}g|D]<}|jddƒjddƒjdd ƒj||ƒ^qN}|j|ƒd }d |}|j||ƒ|S( Nt-t_s%define version sSource0: %{name}-%{version}.tars)Source0: %{name}-%{unmangled_version}.tarssetup.py install s5setup.py install --single-version-externally-managed s%setups&%setup -n %{name}-%{unmangled_version}is%define unmangled_version (t distributiont get_versiontreplaceRRt_make_spec_filetindextinsert( Rtversiont rpmversiontspectline23tline24tlinet insert_loctunmangled_version((s@/usr/lib/python2.7/site-packages/setuptools/command/bdist_rpm.pyR s   F (t__name__t __module__t__doc__RR (((s@/usr/lib/python2.7/site-packages/setuptools/command/bdist_rpm.pyRs  (tdistutils.command.bdist_rpmtcommandRR(((s@/usr/lib/python2.7/site-packages/setuptools/command/bdist_rpm.pyts