a
    –§»a  ã                   @   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 d S )Nz.bcú.o)ÚllvmÚolibsÚpythonÚfind_pyext_endingÚfind_shared_ending)Úargs© r   úM/home/yuhw/wc/pochoir/venv/lib/python3.9/site-packages/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rä|	 tj¡ |	 d¡ | j�r&| jd | _tj | j¡d }
tj |
¡d }n4tj | jd ¡d }tj |¡d }|t| ƒ | _|	 d | j¡ | j�r‚td!ƒ t d¡ |	 d"| j¡ | | j¡ ||j |d#�}| j!�rÐ|	 d$¡ |j"| j| j#d%� n²| j$�rö|	 d&¡ |j%| j| j#d%� nŒ|	 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
   Z
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ÚexitZprocess_input_filesZexport_registryr   Zwrite_llvm_bitcoder	   r   Zwrite_native_objectÚtempfileÚ
gettempdirÚsepÚbasenameZget_python_librariesZlink_sharedZget_python_library_dirsZdll_exportsÚremove)r   r   r   r   r   r
   r   ÚparserÚgroupÚloggerZoutput_baser   Z
input_baser    Z	toolchainZtemp_objÚ	librariesr   r   r   Úmain   sŠ    ÿ
ÿ
ÿÿÿÿ
ÿ






ÿÿýr>   )N)r-   r&   Ú
subprocessr5   r3   Úccr   r   r   r   r   r>   r   r   r   r   Ú<module>   s   