o
    Ebb                     @   sB   d dl Z d dlZd dlmZ dd Zedkree jd  dS dS )    N)Tempitac                 C   s   |  dstd|  tjj}|| t d}| }tj	
| d }t|d}|| W d   dS 1 s9w   Y  dS )zProcess tempita templated file and write out the result.

    The template file is expected to end in `.c.in` or `.pyx.in`:
    E.g. processing `template.c.in` generates `template.c`.

    z.inzUnexpected extension: %s)encodingr   wN)endswith
ValueErrortempitaZTemplatefrom_filenamesysgetdefaultencodingZ
substituteospathsplitextopenwrite)Zfromfiler   templateZcontentZoutfilef r   </usr/lib/python3/dist-packages/scipy/_build_utils/tempita.pyprocess_tempita	   s   
"r   __main__   )r	   r   ZCythonr   r   r   __name__argvr   r   r   r   <module>   s    