o
    8ήc                     @   sZ   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d Z
d	ddZdS )
    N   )CC)export
exportmanyc                 C   s&   | j rdS | jr
dS | jrt S t S )Nz.bc.o)llvmolibspythonfind_pyext_endingfind_shared_ending)args r   :/tmp/pip-target-vg8gfxp4/lib/python/numba/pycc/__init__.py
get_ending   s   r   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 |j
ddddd | }|j
ddddd |j
dddd |j
dddd |j
dddd |j
ddddd || } tt}	| jrr|	tj |	d | jr| jd | _tj| jd }
tj|
d }ntj| jd d }tj|d }|t|  | _|	d | j | jrtd! td |	d"| j || j ||j |d#}| j!r|	d$ |j"| j| j#d% d S | j$r|	d& |j%| j| j#d% d S |	d' |	d(t&'  | }| j|_t&' tj( tj)| j d) }|j%|| j#d% |* }|j+| j|g|* |, |j-d* t.| d S )+Nr   r   )ModuleCompiler)	Toolchainr   r
   )
decoratorsz>DEPRECATED - Compile Python modules to a single shared library)descriptioninputs+zInput file(s))nargshelpz-ooutputz@Output file  (default is name of first input -- with new ending))r   destr   z-c
store_truer   z<Create object file from each input instead of shared-library)actionr   r   z--llvmz Emit llvm instead of native code)r   r   z--headerz+Emit C header file with function signaturesz--pythonzNEmit additionally generated Python wrapper and extension module code in outputz-dz--debugzPrint extra debug informationzIThe 'pycc' script is DEPRECATED; please use the numba.pycc.CC API insteadzargs.output --> %szKERROR: pycc --header has been disabled in this release due to a known issuezinputs --> %s)module_namez	emit llvm)wrapzemit object filezemit shared libraryz!write to temporary object file %sr   )export_symbols)/argparsecompilerr   platformr   r   r
   
numba.pyccr   ArgumentParseradd_argumentadd_mutually_exclusive_group
parse_argslogging	getLogger__name__debugsetLevelDEBUGwarnr   ospathsplitsplitextr   r   headerprintsysexitprocess_input_filesexport_registryr   write_llvm_bitcoder	   r   write_native_objecttempfile
gettempdirsepbasenameget_python_librarieslink_sharedget_python_library_dirsdll_exportsremove)r   r   r   r   r   r
   r   parsergrouploggeroutput_baser   
input_baser    	toolchaintemp_obj	librariesr   r   r   main   s   









rK   )N)r.   r'   
subprocessr:   r4   ccr   r   r   r   r   rK   r   r   r   r   <module>   s   