ó
\K]c           @` s   d  d l  m Z m Z m Z d  d l Z d  d l Z d  d l Z d  d l Z d  d l Z d d l	 m
 Z
 d d l m Z m Z d   Z d d  Z d S(   i    (   t   print_functiont   divisiont   absolute_importNi   (   t   CC(   t   exportt
   exportmanyc         C` s5   |  j  r d S|  j r d S|  j r* t   St   Sd  S(   Ns   .bcs   .o(   t   llvmt   olibst   pythont   find_pyext_endingt   find_shared_ending(   t   args(    (    s2   lib/python2.7/site-packages/numba/pycc/__init__.pyt
   get_ending   s    			c         C` s  d d  l  } d d l m } d d l m } m } m } d d l m } | j	 d d  } | j
 d d	 d
 d d | j
 d d	 d d d d d | j   } | j
 d d d d d d d | j
 d d d d d | j
 d d d d d | j
 d d d d d | j
 d d d d d d | j |   }  t j t  }	 |  j r^|	 j t j  n  |	 j d  |  j r¶|  j d |  _ t j j |  j  d }
 t j j |
  d } nF t j j |  j d  d } t j j |  d } | t |   |  _ |	 j d  |  j  |  j r2t d!  t j d  n  |	 j d" |  j  | j |  j  | | j  d# | } |  j! r|	 j d$  | j" |  j d% |  j# nō |  j$ rĪ|	 j d&  | j% |  j d% |  j# nĀ |	 j d'  |	 j d( t& j'    |   } |  j | _ t& j'   t j( t j j) |  j  d) } | j% | d% |  j# | j*   } | j+ |  j | g | j*   | j,   d* | j- t j. |  d  S(+   Ni    i   (   t   ModuleCompiler(   t	   ToolchainR
   R	   (   t
   decoratorst   descriptions>   DEPRECATED - Compile Python modules to a single shared libraryt   inputst   nargst   +t   helps   Input file(s)s   -ot   destt   outputs@   Output file  (default is name of first input -- with new ending)s   -ct   actiont
   store_trueR   s<   Create object file from each input instead of shared-librarys   --llvms    Emit llvm instead of native codes   --headers+   Emit C header file with function signaturess   --pythonsN   Emit additionally generated Python wrapper and extension module code in outputs   -ds   --debugs   Print extra debug informationsI   The 'pycc' script is DEPRECATED; please use the numba.pycc.CC API insteads   args.output --> %ssK   ERROR: pycc --header has been disabled in this release due to a known issues   inputs --> %st   module_names	   emit llvmt   wraps   emit object files   emit shared librarys!   write to temporary object file %ss   .ot   export_symbols(/   t   argparset   compilerR   t   platformR   R
   R	   t    R   t   ArgumentParsert   add_argumentt   add_mutually_exclusive_groupt
   parse_argst   loggingt	   getLoggert   __name__t   debugt   setLevelt   DEBUGt   warnR   t   ost   patht   splitt   splitextR   R   t   headert   printt   syst   exitt   process_input_filest   export_registryR   t   write_llvm_bitcodeR   R   t   write_native_objectt   tempfilet
   gettempdirt   sept   basenamet   get_python_librariest   link_sharedt   get_python_library_dirst   dll_exportst   remove(   R   R   R   R   R
   R	   R   t   parsert   groupt   loggert   output_baseR   t
   input_baseR   t	   toolchaint   temp_objt	   libraries(    (    s2   lib/python2.7/site-packages/numba/pycc/__init__.pyt   main   sr    					
			*	
(   t
   __future__R    R   R   R+   R$   t
   subprocessR7   R1   t   ccR   R   R   R   R   t   NoneRH   (    (    (    s2   lib/python2.7/site-packages/numba/pycc/__init__.pyt   <module>   s   	