Ñò
6»‚Uc           @   s°   d  d k  l Z d  d k l Z d  d k l Z l Z d  d k Z d  d k Z d  d k	 l
 Z
 l Z l Z d  d k l Z d  d k l Z d  d k Z d e f d	 „  ƒ  YZ d S(
   iÿÿÿÿ(   t   convert_path(   t   log(   t   DistutilsErrort   DistutilsOptionErrorN(   t   Distributiont   PathMetadatat   normalize_path(   t   easy_install(   t   PY3t   developc           B   ss   e  Z d  Z d Z e i d d g Z e i d g Z e Z	 d „  Z
 d „  Z d	 „  Z d
 „  Z d „  Z d „  Z RS(   s   Set up package for developments%   install package in 'development mode't	   uninstallt   us   Uninstall this source packages	   egg-path=s-   Set the path to be used in the .egg-link filec         C   s9   |  i  o t |  _ |  i ƒ  n |  i ƒ  |  i ƒ  d  S(   N(   R
   t   Truet   multi_versiont   uninstall_linkt   install_for_developmentt   warn_deprecated_options(   t   self(    (    s>   /usr/lib/python2.6/site-packages/setuptools/command/develop.pyt   run   s
    
	
c         C   s5   d  |  _ d  |  _ t i |  ƒ d  |  _ d |  _ d  S(   Nt   .(   t   NoneR
   t   egg_pathR   t   initialize_optionst
   setup_patht   always_copy_from(   R   (    (    s>   /usr/lib/python2.6/site-packages/setuptools/command/develop.pyR   #   s
    			c         C   s  |  i  d ƒ } | i o, d } | i | i f } t | | ƒ ‚ n | i g |  _ t i |  ƒ |  i ƒ  |  i	 ƒ  |  i
 i t i d ƒ ƒ t i i |  i | i d ƒ |  _ | i |  _ |  i d  j o t i i | i ƒ |  _ n t |  i ƒ } t t i i |  i |  i ƒ ƒ } | | j o t d | ƒ ‚ n t | t | t i i | i ƒ ƒ d | i ƒ|  _ |  i i t i d ƒ } | t i j o d | i d ƒ d	 } n | |  _ t t i i |  i |  i | ƒ ƒ } | t t i ƒ j o t d
 | t t i ƒ ƒ ‚ n d  S(   Nt   egg_infos-   Please rename %r to %r before using 'develop's   *.eggs	   .egg-linksA   --egg-path must be a relative path from the install directory to t   project_namet   /s   ../i   sG   Can't get a consistent path to setup script from installation directory(    t   get_finalized_commandt   broken_egg_infoR   R   t   egg_namet   argsR   t   finalize_optionst   expand_basedirst   expand_dirst   package_indext   scant   globt   ost   patht   joint   install_dirt   egg_linkt   egg_baseR   R   t   abspathR   R   R   R   t   distt   replacet   sept   curdirt   countR   (   R   t   eit   templateR   t   targetR   t   p(    (    s>   /usr/lib/python2.6/site-packages/setuptools/command/develop.pyR    *   sF    


	$c         C   sµ  t  oÔ t |  i d t ƒ o¾ |  i d d d ƒ|  i d ƒ |  i d ƒ } t | i ƒ } |  i d d | ƒ|  i d ƒ |  i d d d ƒ|  i d ƒ |  i d ƒ } | |  _	 | |  i
 _ t | | i ƒ |  i
 _ n. |  i d ƒ |  i d d d ƒ|  i d ƒ |  i ƒ  t i o |  i t i ƒ d  t _ n t i d	 |  i |  i ƒ |  i p; t |  i d
 ƒ } | i |  i	 d |  i ƒ | i ƒ  n |  i d  |  i
 |  i ƒ d  S(   Nt   use_2to3t   build_pyt   inplacei    R   R+   t	   build_exti   s   Creating %s (link to %s)t   ws   
(   R   t   getattrt   distributiont   Falset   reinitialize_commandt   run_commandR   R   t	   build_libR   R-   t   locationR   R   t	   _providert   install_site_pyt
   setuptoolst   bootstrap_install_fromR   R   R   t   infoR*   R+   t   dry_runt   opent   writeR   t   closet   process_distributiont   no_deps(   R   t   bpy_cmdt
   build_patht   ei_cmdt   f(    (    s>   /usr/lib/python2.6/site-packages/setuptools/command/develop.pyR   X   s4    	


c         C   s  t  i i |  i ƒ oµ t i d |  i |  i ƒ t |  i ƒ } g  } | D] } | | i ƒ  qI ~ } | i	 ƒ  | |  i
 g |  i
 |  i g f j o t i d | ƒ d  S|  i p t  i |  i ƒ qË n |  i p |  i |  i ƒ n |  i i o t i d ƒ n d  S(   Ns   Removing %s (link to %s)s$   Link points to %s: uninstall aborteds5   Note: you must uninstall or replace scripts manually!(   R&   R'   t   existsR*   R   RF   R+   RH   t   rstripRJ   R   R   t   warnRG   t   unlinkt
   update_pthR-   R<   t   scripts(   R   t   egg_link_filet   _[1]t   linet   contents(    (    s>   /usr/lib/python2.6/site-packages/setuptools/command/develop.pyR   †   s    '


c         C   sµ   | |  i  j	 o t i |  | ƒ S|  i | ƒ x€ |  i i p g  D]k } t i i t	 | ƒ ƒ } t i i
 | ƒ } t | d ƒ } | i ƒ  } | i ƒ  |  i | | | | ƒ qB Wd  S(   Nt   rU(   R-   R   t   install_egg_scriptst   install_wrapper_scriptsR<   RV   R&   R'   R,   R    t   basenameRH   t   readRJ   t   install_script(   R   R-   t   script_namet   script_pathRP   t   script_text(    (    s>   /usr/lib/python2.6/site-packages/setuptools/command/develop.pyR\   ˜   s     
(   s	   uninstallR   s   Uninstall this source packageN(   s	   egg-path=Ns-   Set the path to be used in the .egg-link file(   t   __name__t
   __module__t   __doc__t   descriptionR   t   user_optionsR   t   boolean_optionsR=   t   command_consumes_argumentsR   R   R    R   R   R\   (    (    (    s>   /usr/lib/python2.6/site-packages/setuptools/command/develop.pyR	      s   
			.	.	(   t   distutils.utilR    t	   distutilsR   t   distutils.errorsR   R   R&   R%   t   pkg_resourcesR   R   R   t   setuptools.command.easy_installR   t   setuptools.compatR   RD   R	   (    (    (    s>   /usr/lib/python2.6/site-packages/setuptools/command/develop.pyt   <module>   s   