
Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­
<!DOCTYPE html>
<html>
ó
wWS`c           @   sƒ  d  Z  d d l m Z d Z d d l Z d d l Z d d l Z d d l Td d l m	 Z	 d d l
 m Z d d l m Z d d	 l m Z d d
 l m Z d d l m Z m Z m Z d d l m Z d d l m Z d d l m Z d d l m Z e j d k  r1i d d 6d d 6d d 6d d 6d d 6Z n) i d d 6d d 6d d 6d d 6d d 6Z i i d d 6d d 6d d 6d d 6d d 6d 6i d d 6d  d 6d! d 6d d 6d d 6d" 6i d# d 6d# d 6d$ d 6d% d 6d& d 6d' 6e d( 6i d# d 6d# d 6d) d 6d* d 6d& d 6d+ 6i d d 6d d 6d d 6d d 6d d 6d, 6i d# d 6d# d 6d$ d 6d% d 6d& d 6d- 6Z d0 Z d. e	 f d/ „  ƒ  YZ d S(1   sF   distutils.command.install

Implements the Distutils 'install' command.iÿÿÿÿ(   t   logs   $Id$N(   t   *(   t   Command(   t   DEBUG(   t   get_config_vars(   t   DistutilsPlatformError(   t
   write_file(   t   convert_patht
   subst_varst   change_root(   t   get_platform(   t   DistutilsOptionError(   t	   USER_BASE(   t	   USER_SITEs   2.2s   $baset   purelibt   platlibs   $base/Include/$dist_namet   headerss   $base/Scriptst   scriptst   datas   $base/Lib/site-packagess/   $base/lib/python$py_version_short/site-packagess5   $platbase/lib64/python$py_version_short/site-packagess0   $base/include/python$py_version_short/$dist_names	   $base/bint   unix_prefixs   $base/lib/pythons   $base/lib64/pythons   $base/include/python/$dist_namet	   unix_homes	   $usersites4   $userbase/include/python$py_version_short/$dist_names   $userbase/bins	   $userbaset	   unix_usert   nts4   $userbase/Python$py_version_nodot/Include/$dist_names   $userbase/Scriptst   nt_usert   os2t   os2_homet   installc           B   s†  e  Z d  Z dH dI dJ d dG d e f dK d dG d d f dL dM dN d dG d d f dO dP dQ dR dS dT dU dV dW g Z d d% d( d g Z i d d  6Z d, „  Z d- „  Z	 d. „  Z
 d/ „  Z d0 „  Z d1 „  Z d2 „  Z d3 „  Z d4 „  Z d5 „  Z d6 „  Z d7 „  Z d8 „  Z d9 „  Z d: „  Z d; „  Z d< „  Z d= „  Z d> „  Z d? „  Z d@ „  Z dA e f dB e f dC e f dD e f dE dF „  f g Z RS(X   s'   install everything from build directorys   prefix=s   installation prefixs   exec-prefix=s.   (Unix only) prefix for platform-specific filess   home=s+   (Unix only) home directory to install undert   users!   install in user site-package '%s's   install-base=s;   base installation directory (instead of --prefix or --home)s   install-platbase=s8   base installation directory for platform-specific files s$   (instead of --exec-prefix or --home)s   root=s<   install everything relative to this alternate root directorys   install-purelib=s;   installation directory for pure Python module distributionss   install-platlib=s8   installation directory for non-pure module distributionss   install-lib=s4   installation directory for all module distributions s3   (overrides --install-purelib and --install-platlib)s   install-headers=s(   installation directory for C/C++ headerss   install-scripts=s)   installation directory for Python scriptss   install-data=s%   installation directory for data filest   compilet   cs   compile .py to .pyc [default]s
   no-compiles   don't compile .py filess	   optimize=t   Osl   also compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0]t   forcet   fs1   force installation (overwrite any existing files)s
   skip-builds2   skip rebuilding everything (for testing/debugging)s   record=s3   filename in which to record list of installed filesc         C   så   d  |  _ d  |  _ d  |  _ d |  _ d  |  _ d  |  _ d  |  _ d  |  _ d  |  _	 d  |  _
 d  |  _ d  |  _ d  |  _ t |  _ t |  _ d  |  _ d  |  _ d  |  _ d |  _ d |  _ d |  _ d |  _ d  |  _ d  |  _ d  |  _ d  S(   Ni    i   (   t   Nonet   prefixt   exec_prefixt   homeR   t   install_baset   install_platbaset   roott   install_purelibt   install_platlibt   install_headerst   install_libt   install_scriptst   install_dataR   t   install_userbaseR   t   install_usersiteR   t   optimizet
   extra_patht   install_path_fileR   t
   skip_buildt   warn_dirt
   build_baset	   build_libt   record(   t   self(    (    s>   /opt/alt/python27/lib64/python2.7/distutils/command/install.pyt   initialize_options£   s2    																	
							c      	   C   sL  |  j  s |  j s |  j r= |  j s- |  j r= t d d ‚ n  |  j rd |  j  sX |  j rd t d ‚ n  |  j r© |  j  sš |  j sš |  j sš |  j sš |  j r© t d ƒ ‚ n  t j d k rÝ |  j rÝ |  j	 d ƒ d  |  _ qÝ n  |  j d ƒ t j d k r|  j ƒ  n
 |  j ƒ  |  j d ƒ t j t j ƒ d	 } t d
 d ƒ \ } } i |  j j ƒ  d 6|  j j ƒ  d 6|  j j ƒ  d 6| d 6| d	 d !d 6| d	 | d d 6| d 6| d
 6| d 6| d 6|  j d 6|  j d 6|  _ |  j ƒ  |  j d ƒ |  j |  j d <|  j |  j d <t r;d d l m } d GH| |  j ƒ n  |  j ƒ  |  j d ƒ |  j rh|  j ƒ  n  |  j d  k r¡|  j j  r’|  j! |  _ q¡|  j" |  _ n  |  j# d d  d! d" d# d$ d d ƒ |  j$ ƒ  |  j |  _% t j& j' |  j |  j( ƒ |  _ |  j) d  k	 r(|  j* d% d d  d! d" d# d$ ƒ n  |  j d& ƒ |  j+ d' d* d+ ƒ d  S(,   Ns.   must supply either prefix/exec-prefix/home or s)   install-base/install-platbase -- not boths9   must supply either home or prefix/exec-prefix -- not bothsG   can't combine user with prefix, exec_prefix/home, or install_(plat)baset   posixs+   exec-prefix option ignored on this platforms   pre-finalize_{unix,other}s   post-finalize_{unix,other}()i    R"   R#   t	   dist_namet   dist_versiont   dist_fullnamet
   py_versioni   t   py_version_shorti   t   py_version_nodott
   sys_prefixt   sys_exec_prefixt   userbaset   usersites   post-expand_basedirs()t   baset   platbaseiÿÿÿÿ(   t   pprints   config vars:s   post-expand_dirs()t   libR   R   R   R   R   t   libbases   after prepending roott   buildR5   R6   (   R5   R5   (   R6   R6   (,   R"   R#   R$   R%   R&   R   R   t   ost   namet   warnR!   t	   dump_dirst   finalize_unixt   finalize_othert   stringt   splitt   syst   versionR   t   distributiont   get_namet   get_versiont   get_fullnameR.   R/   t   config_varst   expand_basedirsR   RG   t   expand_dirst   create_home_pathR+   t   ext_modulesR)   R(   t   convert_pathst   handle_extra_patht   install_libbaset   patht   joint
   extra_dirsR'   t   change_rootst   set_undefined_options(   R8   R>   R"   R#   RG   (    (    s>   /opt/alt/python27/lib64/python2.7/distutils/command/install.pyt   finalize_optionsð   s~    
	$	




		

	c         C   sÏ   t  rË d d l m } | d GHx© |  j D]› } | d } | d d k rY | d d !} n  | |  j k r” t j |  j | | ƒ } t |  | ƒ } n! t j | | ƒ } t |  | ƒ } d | | f GHq) Wn  d  S(   Niÿÿÿÿ(   t   longopt_xlatet   :i    t   =s     %s: %s(   R   t   distutils.fancy_getoptRg   t   user_optionst   negative_optRQ   t	   translatet   getattr(   R8   t   msgRg   t   optt   opt_namet   val(    (    s>   /opt/alt/python27/lib64/python2.7/distutils/command/install.pyRN   ~  s    	
	c         C   s¨  |  j  d  k	 s |  j d  k	 rˆ |  j d  k rK |  j d  k rK |  j d  k sx |  j d  k sx |  j d  k sx |  j d  k r„ t	 d ‚ n  d  S|  j
 rÒ |  j d  k r¯ t d ƒ ‚ n  |  j |  _  |  _ |  j d ƒ nÒ |  j d  k	 r|  j |  _  |  _ |  j d ƒ n  |  j d  k ra|  j d  k	 r.t	 d ‚ n  t j j t j ƒ |  _ t j j t j ƒ |  _ n |  j d  k r|  j |  _ n  |  j |  _  |  j |  _ |  j d ƒ d  S(   NsP   install-base or install-platbase supplied, but installation scheme is incompletes$   User base directory is not specifiedR   R   s*   must not supply exec-prefix without prefixR   (   R%   R!   R&   R+   R(   R)   R*   R,   R-   R   R   R.   R   t   select_schemeR$   R"   R#   RK   Ra   t   normpathRS   (   R8   (    (    s>   /opt/alt/python27/lib64/python2.7/distutils/command/install.pyRO   �  s<    			c         C   sü   |  j  rQ |  j d  k r' t d ƒ ‚ n  |  j |  _ |  _ |  j t j d ƒ n§ |  j	 d  k	 rƒ |  j	 |  _ |  _ |  j d ƒ nu |  j
 d  k r­ t j j t j
 ƒ |  _
 n  |  j
 |  _ |  _ y |  j t j ƒ Wn! t k
 r÷ t d t j ‚ n Xd  S(   Ns$   User base directory is not specifiedt   _userR   s)   I don't know how to install stuff on '%s'(   R   R.   R!   R   R%   R&   Rs   RK   RL   R$   R"   Ra   Rt   RS   t   KeyError(   R8   (    (    s>   /opt/alt/python27/lib64/python2.7/distutils/command/install.pyRP   »  s"    	c         C   sU   t  | } xD t D]< } d | } t |  | ƒ d  k r t |  | | | ƒ q q Wd  S(   Nt   install_(   t   INSTALL_SCHEMESt   SCHEME_KEYSRn   R!   t   setattr(   R8   RL   t   schemet   keyt   attrname(    (    s>   /opt/alt/python27/lib64/python2.7/distutils/command/install.pyRs   Ô  s
    

c         C   sˆ   x� | D]y } t  |  | ƒ } | d  k	 r t j d k sF t j d k r[ t j j | ƒ } n  t | |  j ƒ } t |  | | ƒ q q Wd  S(   NR:   R   (	   Rn   R!   RK   RL   Ra   t
   expanduserR   RY   Rz   (   R8   t   attrst   attrRr   (    (    s>   /opt/alt/python27/lib64/python2.7/distutils/command/install.pyt   _expand_attrsÝ  s    c         C   s   |  j  d d d g ƒ d  S(   NR%   R&   R'   (   R�   (   R8   (    (    s>   /opt/alt/python27/lib64/python2.7/distutils/command/install.pyRZ   ç  s    	c         C   s#   |  j  d d d d d d g ƒ d  S(   NR(   R)   R+   R*   R,   R-   (   R�   (   R8   (    (    s>   /opt/alt/python27/lib64/python2.7/distutils/command/install.pyR[   ì  s    	c         G   s>   x7 | D]/ } d | } t  |  | t t |  | ƒ ƒ ƒ q Wd  S(   NRw   (   Rz   R   Rn   (   R8   t   namesRL   R€   (    (    s>   /opt/alt/python27/lib64/python2.7/distutils/command/install.pyR^   õ  s    
c         C   sê   |  j  d  k r! |  j j  |  _  n  |  j  d  k	 rÈ t |  j  ƒ t k r` t j |  j  d ƒ |  _  n  t |  j  ƒ d k r‰ |  j  d } } n0 t |  j  ƒ d k r° |  j  \ } } n	 t d ‚ t	 | ƒ } n d  } d } | |  _
 | |  _ d  S(   Nt   ,i   i    i   sY   'extra_path' option must be a list, tuple, or comma-separated string with 1 or 2 elementst    (   R1   R!   RU   t   typet
   StringTypeRQ   RR   t   lenR   R   t	   path_fileRc   (   R8   Rˆ   Rc   (    (    s>   /opt/alt/python27/lib64/python2.7/distutils/command/install.pyR_   û  s     	c      	   G   sD   x= | D]5 } d | } t  |  | t |  j t |  | ƒ ƒ ƒ q Wd  S(   NRw   (   Rz   R	   R'   Rn   (   R8   R‚   RL   R€   (    (    s>   /opt/alt/python27/lib64/python2.7/distutils/command/install.pyRd     s    
c         C   s�   |  j  s d St t j j d ƒ ƒ } xc |  j j ƒ  D]R \ } } | j | ƒ r5 t j j | ƒ r5 |  j	 d | ƒ t j
 | d ƒ q5 q5 Wd S(   s#   Create directories under ~
        Nt   ~s   os.makedirs('%s', 0700)iÀ  (   R   R   RK   Ra   R~   RY   t	   iteritemst
   startswitht   isdirt   debug_printt   makedirs(   R8   R$   RL   Ra   (    (    s>   /opt/alt/python27/lib64/python2.7/distutils/command/install.pyR\   "  s    	"c         C   s¤  |  j  sU |  j d ƒ |  j j d ƒ j } |  j rU | t ƒ  k rU t d ƒ ‚ qU n  x! |  j ƒ  D] } |  j | ƒ qb W|  j	 r� |  j
 ƒ  n  |  j r|  j ƒ  } |  j rî t |  j ƒ } x/ t t | ƒ ƒ D] } | | | | | <qÏ Wn  |  j t |  j | f d |  j ƒ n  t t j j t j ƒ } t t j j | ƒ } t j j t j j |  j ƒ ƒ } |  j r |  j	 oz|  j r | | k r t j d |  j ƒ n  d  S(   NRJ   s"   Can't install when cross-compilings'   writing list of installed files to '%s'sƒ   modules installed to '%s', which is not in Python's module search path (sys.path) -- you'll have to change the search path yourself(   R3   t   run_commandRU   t   get_command_objt	   plat_nameR4   R
   R   t   get_sub_commandsRˆ   t   create_path_fileR7   t   get_outputsR'   R‡   t   xranget   executeR   t   mapRK   Ra   Rt   RS   t   normcaseR+   R2   R    t   debug(   R8   t
   build_platt   cmd_namet   outputst   root_lent   countert   sys_pathR+   (    (    s>   /opt/alt/python27/lib64/python2.7/distutils/command/install.pyt   run/  s6    					!		c         C   sc   t  j j |  j |  j d ƒ } |  j rN |  j t | |  j g f d | ƒ n |  j	 d | ƒ d  S(   Ns   .pths   creating %ss   path file '%s' not created(
   RK   Ra   Rb   R`   Rˆ   R2   R–   R   Rc   RM   (   R8   t   filename(    (    s>   /opt/alt/python27/lib64/python2.7/distutils/command/install.pyR“   ]  s    		c         C   sž   g  } xV |  j  ƒ  D]H } |  j | ƒ } x0 | j ƒ  D]" } | | k r5 | j | ƒ q5 q5 Wq W|  j rš |  j rš | j t j j |  j	 |  j d ƒ ƒ n  | S(   Ns   .pth(
   R’   t   get_finalized_commandR”   t   appendRˆ   R2   RK   Ra   Rb   R`   (   R8   Rœ   R›   t   cmdR¡   (    (    s>   /opt/alt/python27/lib64/python2.7/distutils/command/install.pyR”   j  s    c         C   sC   g  } x6 |  j  ƒ  D]( } |  j | ƒ } | j | j ƒ  ƒ q W| S(   N(   R’   R¢   t   extendt
   get_inputs(   R8   t   inputsR›   R¤   (    (    s>   /opt/alt/python27/lib64/python2.7/distutils/command/install.pyR¦   {  s
    c         C   s   |  j  j ƒ  p |  j  j ƒ  S(   sR   Return true if the current distribution has any Python
        modules to install.(   RU   t   has_pure_modulest   has_ext_modules(   R8   (    (    s>   /opt/alt/python27/lib64/python2.7/distutils/command/install.pyt   has_lib‡  s    c         C   s   |  j  j ƒ  S(   N(   RU   t   has_headers(   R8   (    (    s>   /opt/alt/python27/lib64/python2.7/distutils/command/install.pyR«   �  s    c         C   s   |  j  j ƒ  S(   N(   RU   t   has_scripts(   R8   (    (    s>   /opt/alt/python27/lib64/python2.7/distutils/command/install.pyR¬   �  s    c         C   s   |  j  j ƒ  S(   N(   RU   t   has_data_files(   R8   (    (    s>   /opt/alt/python27/lib64/python2.7/distutils/command/install.pyt   has_data“  s    R+   R*   R,   R-   t   install_egg_infoc         C   s   t  S(   N(   t   True(   R8   (    (    s>   /opt/alt/python27/lib64/python2.7/distutils/command/install.pyt   <lambda>�  R„   N(   s   prefix=Ns   installation prefix(   s   exec-prefix=Ns.   (Unix only) prefix for platform-specific files(   s   home=Ns+   (Unix only) home directory to install under(   s   install-base=Ns;   base installation directory (instead of --prefix or --home)(   s   root=Ns<   install everything relative to this alternate root directory(   s   install-purelib=Ns;   installation directory for pure Python module distributions(   s   install-platlib=Ns8   installation directory for non-pure module distributions(   s   install-headers=Ns(   installation directory for C/C++ headers(   s   install-scripts=Ns)   installation directory for Python scripts(   s   install-data=Ns%   installation directory for data files(   R   R   s   compile .py to .pyc [default](   s
   no-compileNs   don't compile .py files(   s	   optimize=R   sl   also compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0](   R   R    s1   force installation (overwrite any existing files)(   s
   skip-buildNs2   skip rebuilding everything (for testing/debugging)(   s   record=Ns3   filename in which to record list of installed files(   t   __name__t
   __module__t   descriptionR!   R   Rk   t   boolean_optionsRl   R9   Rf   RN   RO   RP   Rs   R�   RZ   R[   R^   R_   Rd   R\   R    R“   R”   R¦   Rª   R«   R¬   R®   t   sub_commands(    (    (    s>   /opt/alt/python27/lib64/python2.7/distutils/command/install.pyR   ^   s†      
           		M	Ž		+				
					"			.											(   R   R   R   R   R   (    t   __doc__t	   distutilsR    t   __revision__RS   RK   RQ   t   typest   distutils.coreR   t   distutils.debugR   t   distutils.sysconfigR   t   distutils.errorsR   t   distutils.file_utilR   t   distutils.utilR   R   R	   R
   R   t   siteR   R   RT   t   WINDOWS_SCHEMERx   Ry   R   (    (    (    s>   /opt/alt/python27/lib64/python2.7/distutils/command/install.pyt   <module>   s†   $

