ó
è¾bc           @   s˜   d  Z  d 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
 m Z d d l m Z d d	 l m Z d
 e f d „  ƒ  YZ d S(   s·   distutils.command.bdist_dumb

Implements the Distutils 'bdist_dumb' command (create a "dumb" built
distribution -- i.e., just an archive to be unpacked under $prefix or
$exec_prefix).s   $Id$iÿÿÿÿN(   t   get_python_version(   t   get_platform(   t   Command(   t   remove_treet   ensure_relative(   t   DistutilsPlatformError(   t   logt
   bdist_dumbc           B   s‘   e  Z d  Z d" d d d e ƒ  f d# d
 d d d f d$ d& d' d( d) g	 Z d
 d d g Z i d d 6d d 6d d 6Z d „  Z d  „  Z	 d! „  Z
 RS(*   s"   create a "dumb" built distributions
   bdist-dir=t   ds1   temporary directory for creating the distributions
   plat-name=t   ps;   platform name to embed in generated filenames (default: %s)s   format=t   fs0   archive format to create (tar, ztar, gztar, zip)s	   keep-tempt   ks/   keep the pseudo-installation tree around after s!   creating the distribution archives	   dist-dir=s-   directory to put final built distributions ins
   skip-builds2   skip rebuilding everything (for testing/debugging)t   relatives7   build the archive using relative paths (default: false)s   owner=t   us@   Owner name used when creating a tar file [default: current user]s   group=t   gsA   Group name used when creating a tar file [default: current group]t   gztart   posixt   zipt   ntt   os2c         C   sU   d  |  _ d  |  _ d  |  _ d |  _ d  |  _ d  |  _ d |  _ d  |  _ d  |  _	 d  S(   Ni    (
   t   Nonet	   bdist_dirt	   plat_namet   formatt	   keep_tempt   dist_dirt
   skip_buildR   t   ownert   group(   t   self(    (    s2   /usr/lib/python2.7/distutils/command/bdist_dumb.pyt   initialize_options7   s    								c         C   s§   |  j  d  k r< |  j d ƒ j } t j j | d ƒ |  _  n  |  j d  k r y |  j t j	 |  _ Wq t
 k
 r‰ t d d t j	 ‚ q Xn  |  j d d d	 d
 ƒ d  S(   Nt   bdistt   dumbs2   don't know how to create dumb built distributions s   on platform %sR   R   R   (   R   R   (   R   R   (   R   R   (   R   R   t   get_finalized_commandt
   bdist_baset   ost   patht   joinR   t   default_formatt   namet   KeyErrorR   t   set_undefined_options(   R   R"   (    (    s2   /usr/lib/python2.7/distutils/command/bdist_dumb.pyt   finalize_optionsB   s    	c      	   C   s×  |  j  s |  j d ƒ n  |  j d d d ƒ} |  j | _ |  j  | _  d | _ t j d |  j ƒ |  j d ƒ d |  j j	 ƒ  |  j
 f } t j d k r° | j d	 d
 ƒ } n  t j j |  j | ƒ } |  j sÝ |  j } nj |  j j ƒ  r&| j | j k r&t d t | j ƒ t | j ƒ f ‚ n! t j j |  j t | j ƒ ƒ } |  j | |  j d | d |  j d |  j ƒ} |  j j ƒ  rt ƒ  } n d } |  j j j d | | f ƒ |  j sÓt  |  j d |  j! ƒn  d  S(   Nt   buildt   installt   reinit_subcommandsi   i    s   installing to %ss   %s.%sR   t   :t   -sS   can't make a dumb built distribution where base and platbase are different (%s, %s)t   root_dirR   R   t   anyR   t   dry_run("   R   t   run_commandt   reinitialize_commandR   t   roott   warn_dirR   t   infot   distributiont   get_fullnameR   R#   R'   t   replaceR$   R%   R   R   t   has_ext_modulest   install_baset   install_platbaseR   t   reprR   t   make_archiveR   R   R   R    t
   dist_filest   appendR   R   R2   (   R   R,   t   archive_basenamet   pseudoinstall_roott   archive_roott   filenamet	   pyversion(    (    s2   /usr/lib/python2.7/distutils/command/bdist_dumb.pyt   runT   sB    				
	(   s
   bdist-dir=R   s1   temporary directory for creating the distribution(   s   format=R
   s0   archive format to create (tar, ztar, gztar, zip)(   s	   dist-dir=R   s-   directory to put final built distributions inN(   s
   skip-buildNs2   skip rebuilding everything (for testing/debugging)(   R   Ns7   build the archive using relative paths (default: false)(   s   owner=R   s@   Owner name used when creating a tar file [default: current user](   s   group=R   sA   Group name used when creating a tar file [default: current group](   t   __name__t
   __module__t   descriptionR   R   t   user_optionst   boolean_optionsR&   R   R*   RG   (    (    (    s2   /usr/lib/python2.7/distutils/command/bdist_dumb.pyR      s8    
      	

		(   t   __doc__t   __revision__R#   t	   sysconfigR    t   distutils.utilR   t   distutils.coreR   t   distutils.dir_utilR   R   t   distutils.errorsR   t	   distutilsR   R   (    (    (    s2   /usr/lib/python2.7/distutils/command/bdist_dumb.pyt   <module>   s   