³ò
Ü‘RMc           @   s~   d  d k  Z  d  d k l Z d  d k l Z l Z l Z d  d k Z d Z d „  Z	 d „  Z
 d d „ Z d „  Z d	 „  Z d S(
   iÿÿÿÿN(   t   get_pypy_config(   t   Configt   OptionDescriptiont   to_optparsesp   For detailed descriptions of all the options see
http://codespeak.net/pypy/dist/pypy/doc/config/commandline.htmlc         C   s   d d k  l } | i ƒ  d  S(   Niÿÿÿÿ(   t	   tb_server(   t	   pypy.toolR   t   start(   t   optiont   optt   valuet   parserR   (    (    s$   /64/home/arigo/u/pypy/tool/option.pyt   run_tb_server   s    c          C   sM   t  ƒ  }  t |  d d g d t ƒ} | i d d d d t d d ƒ|  | f S(	   Nt
   useoptionss
   objspace.*t   extra_useages   -Ht   actiont   callbackt   helps"   use web browser for traceback info(   R    R   R   t
   add_optionR   (   t   configR
   (    (    s$   /64/home/arigo/u/pypy/tool/option.pyt   get_standard_options   s    		c         C   s#   |  i  ƒ  |  i | ƒ \ } } | S(   N(   t   disable_interspersed_argst
   parse_args(   R
   t   argvt   optionst   args(    (    s$   /64/home/arigo/u/pypy/tool/option.pyt   process_options   s    
c         K   s‚   t  d t ƒ } | i d d ƒ } | d j	 o | | i _ n x0 | i d g  ƒ D] } t | i i | t ƒ qQ W| i	 |   | S(   sN    make a config from cmdline options (which overrides everything)
    and kwds t   translatingt   objspacet
   usemodulesN(
   R    t   Falset   popt   NoneR   t   namet   setattrR   t   Truet   set(   t
   cmdlineoptt   kwdsR   R   t   modname(    (    s$   /64/home/arigo/u/pypy/tool/option.pyt   make_config   s     c         C   s;   t  d |  i i d  d  d g ƒ } | i } | |  ƒ } | S(   Ns   pypy.objspace.%st   Space(   t
   __import__R   R    R   R(   (   R   t   modR(   t   space(    (    s$   /64/home/arigo/u/pypy/tool/option.pyt   make_objspace+   s
    	(   t   ost   pypy.config.pypyoptionR    t   pypy.config.configR   R   R   t   optparseR   R   R   R   R   R'   R,   (    (    (    s$   /64/home/arigo/u/pypy/tool/option.pys   <module>   s   		
	
