
    0A7h                         d dl mZmZ d dlZd dlZd dlmZ d dlmZ d dlm	Z	 ddl
mZ  G d d	ej                  e      Zy)
    )logdir_utilN)Command)
namespaces)unpack_archive   )ensure_directoryc                   8    e Zd ZdZdZdgZd Zd Zd Zd Z	d Z
y)	install_egg_infoz.Install an .egg-info directory for the package)zinstall-dir=dzdirectory to install toc                 .    d | _         d | _        d | _        y N)install_dirinstall_layoutprefix_optionselfs    E/usr/lib/python3/dist-packages/setuptools/command/install_egg_info.pyinitialize_optionsz#install_egg_info.initialize_options   s    "!    c                    | j                  dd       | j                  dd       t        j                  dkD  r| j                  dd       | j                  d      }|j	                          d}| j
                  rm| j
                  j                         d	vrt        d
      | j
                  j                         | _        |j                  dt        j                  d d z  d      }nE| j                  sdt        j                  v rn&|j                  dt        j                  d d z  d      }|j                  | _        t        j                  j!                  | j"                  |      | _        g | _        y )Ninstall_lib)r   r   install)r   r   i  )r   r   egg_infoz	.egg-infodebz"unknown value for --install-layoutz-py%s    real_prefix)set_undefined_optionssys
hexversionget_finalized_command_get_egg_basenamer   lowerDistutilsOptionErrorreplaceversionr   __dict__r   sourceospathjoinr   targetoutputs)r   ei_cmdbasenames      r   finalize_optionsz!install_egg_info.finalize_options   s1   ""=2PQ""9-PQ>>I%&&y1RS++J7..01;&&,,.'9*+OPP"&"5"5";";"=D''#++bq/(A2FH=CLL#@''#++bq/(A2FHooggll4#3#3X>r   c                    | j                  d       t        j                  j                  | j                        rUt        j                  j                  | j                        s,t        j                  | j                  | j                         nbt        j                  j                  | j                        r9| j                  t        j                  | j                  fd| j                  z          | j                  st        | j                         | j                  | j                  dd| j                  d| j                         | j                          y )Nr   )dry_runz	Removing  zCopying z to )run_commandr+   r,   isdirr.   islinkr   remove_treer4   existsexecuteunlinkr	   copytreer*   install_namespacesr   s    r   runzinstall_egg_info.run/   s    $77==%bggnnT[[.I  dllCWW^^DKK(LLT[[NK$++4MN||T[[)T]]Bdkk4;;(WX!r   c                     | j                   S r   )r/   r   s    r   get_outputszinstall_egg_info.get_outputs:   s    ||r   c                 R      fd}t         j                   j                  |       y )Nc                 0   dD ]  }| j                  |      sd|z   | v s y  j                  r5j                  dv r'| j                  d      rt        j                  d       y j                  j                  |       t        j                  d| |       |S )N)z.svn/zCVS//r   zSOURCES.txtzSkipping SOURCES.txtzCopying %s to %s)
startswithr   r   infor/   appenddebug)srcdstskipr   s      r   skimmerz*install_egg_info.copytree.<locals>.skimmer?   s     (  >>$'3:+<  ""t':':g'E#..YfJg/0LL$II(#s3Jr   )r   r*   r.   )r   rL   s   ` r   r=   zinstall_egg_info.copytree=   s    	 	t{{DKK9r   N)__name__
__module____qualname____doc__descriptionuser_optionsr   r2   r?   rA   r=   r5   r   r   r   r   
   s/    8BK 	9L"
.	":r   r   )	distutilsr   r   r+   r!   
setuptoolsr   r   setuptools.archive_utilr   _pathr	   	Installerr   r5   r   r   <module>rX      s-    #   ! 2 $C:z++W C:r   