Ñò
6»‚Uc           @   s/   d  d k  i i Z d e i f d „  ƒ  YZ d S(   iÿÿÿÿNt	   bdist_rpmc           B   s    e  Z d  Z d „  Z d „  Z RS(   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.
    c         C   s!   |  i  d ƒ t i i |  ƒ d  S(   Nt   egg_info(   t   run_commandt   origR    t   run(   t   self(    (    s@   /usr/lib/python2.6/site-packages/setuptools/command/bdist_rpm.pyR      s    c   
      C   sÉ   |  i  i ƒ  } | i d d ƒ } t i i |  ƒ } d | } d | } g  } | D]= } | | i d d ƒ i d d ƒ i d d	 ƒ i | | ƒ qR ~ } | i | ƒ d
 } d | }	 | i | |	 ƒ | S(   Nt   -t   _s   %define version s   Source0: %{name}-%{version}.tars)   Source0: %{name}-%{unmangled_version}.tars   setup.py install s5   setup.py install --single-version-externally-managed s   %setups&   %setup -n %{name}-%{unmangled_version}i   s   %define unmangled_version (   t   distributiont   get_versiont   replaceR   R    t   _make_spec_filet   indext   insert(
   R   t   versiont
   rpmversiont   spect   line23t   line24t   _[1]t   linet
   insert_loct   unmangled_version(    (    s@   /usr/lib/python2.6/site-packages/setuptools/command/bdist_rpm.pyR      s    


J
(   t   __name__t
   __module__t   __doc__R   R   (    (    (    s@   /usr/lib/python2.6/site-packages/setuptools/command/bdist_rpm.pyR       s   		(   t   distutils.command.bdist_rpmt   commandR    R   (    (    (    s@   /usr/lib/python2.6/site-packages/setuptools/command/bdist_rpm.pyt   <module>   s   