ó
X¾÷Xc           @   si   d  d l  Z  d  d l m Z d  d l m Z d  d l m Z d  d l m Z d e j f d „  ƒ  YZ	 d S(   iÿÿÿÿN(   t   easy_install(   t   base(   t   options(   t	   packagingt   CommandsConfigc           B   s2   e  Z d  Z d „  Z d „  Z d „  Z d „  Z RS(   t   globalc         C   s2   t  t |  ƒ j | ƒ |  j j d d ƒ |  _ d  S(   Nt   commandst    (   t   superR   t   __init__t   configt   getR   (   t   selfR
   (    (    s/   /tmp/pip-build-h1VYrz/pbr/pbr/hooks/commands.pyR	      s    c         C   s'   |  j  |  j d <t t |  ƒ j ƒ  d  S(   NR   (   R   R
   R   R   t   save(   R   (    (    s/   /tmp/pip-build-h1VYrz/pbr/pbr/hooks/commands.pyR   !   s    c         C   s   d |  j  | f |  _  d  S(   Ns   %s
%s(   R   (   R   t   command(    (    s/   /tmp/pip-build-h1VYrz/pbr/pbr/hooks/commands.pyt   add_command%   s    c         C   sC  |  j  d ƒ |  j  d ƒ |  j  d ƒ |  j  d ƒ |  j  d ƒ |  j  d ƒ t j d k rl t j t _ n  t j ƒ  r• |  j  d ƒ |  j  d	 ƒ n  t j j	 d
 ƒ rÃ t j
 ƒ  rÃ |  j  d ƒ n1 |  j j d t ƒ rô t j ƒ  rô |  j  d ƒ n  t j |  j d d ƒ } d |  j k s"| r2|  j  d ƒ n |  j  d ƒ d  S(   Ns   pbr.packaging.LocalEggInfos   pbr.packaging.LocalSDists!   pbr.packaging.LocalInstallScriptss   pbr.packaging.LocalDevelops   pbr.packaging.LocalRPMVersions   pbr.packaging.LocalDebVersiont   nts   pbr.builddoc.LocalBuildDocs   pbr.builddoc.LocalBuildLatexs   .testr.confs   pbr.packaging.TestrTestt	   nosetestss   pbr.packaging.NoseTests   use-eggt   PBR_USE_EGGt   manpagess   pbr.packaging.LocalInstalls   pbr.packaging.InstallWithGit(   R   t   ost   nameR   t   override_get_script_argsR    t   get_script_argst   have_sphinxt   patht   existst
   have_testrR
   R   t   Falset	   have_noseR   t   get_boolean_optiont
   pbr_config(   R   t   use_egg(    (    s/   /tmp/pip-build-h1VYrz/pbr/pbr/hooks/commands.pyt   hook(   s(    !(   t   __name__t
   __module__t   sectionR	   R   R   R!   (    (    (    s/   /tmp/pip-build-h1VYrz/pbr/pbr/hooks/commands.pyR      s
   			(
   R   t   setuptools.commandR    t	   pbr.hooksR   t   pbrR   R   t
   BaseConfigR   (    (    (    s/   /tmp/pip-build-h1VYrz/pbr/pbr/hooks/commands.pyt   <module>   s
   