
    0Ph|                     T    d dl Z d dlZd dlmZ ddZd Zedk    r e             dS dS )    N)Tempitac                 R   t          | dd          5 }|                                }ddd           n# 1 swxY w Y   t          j        |          }|                                }t          |dd          5 }|                    |           ddd           dS # 1 swxY w Y   dS )zProcess tempita templated file and write out the result.

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

    rzutf-8)encodingNw)openreadtempitaTemplate
substitutewrite)fromfileoutfileftemplate_contenttemplatecontents         \/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/sklearn/_build_utils/tempita.pyprocess_tempitar      s%    
hg	.	.	. $!6688$ $ $ $ $ $ $ $ $ $ $ $ $ $ $  011H!!##G	gsW	-	-	- 	                 s   4889BB #B c                      t          j                    } |                     dt          d           |                     ddt          d           |                     ddt          d	           |                                 }|j                            d
          st          d|j                   |j        st          d          t          j
                            t          j                    |j                  }t          j
                            |t          j
                            t          j
                            |j                  d                   d                   }t          |j        |           d S )NinfilezPath to the input file)typehelpz-oz--outdirzPath to the output directoryz-iz--ignorezKAn ignored input - may be useful to add a dependency between custom targetsz.tpzUnexpected extension: z)Missing `--outdir` argument to tempita.py   r   )argparseArgumentParseradd_argumentstr
parse_argsr   endswith
ValueErroroutdirospathjoingetcwdsplitextsplitr   )parserargs
outdir_absr   s       r   mainr,      sO   $&&F
s1IJJJ
js9WXXX
0     D;&& A?$+??@@@; FDEEEbikk4;77JgllBG$$RW]]4;%?%?%BCCAF G DK)))))    __main__)N)r   r#   Cythonr   r
   r   r,   __name__ r-   r   <module>r2      sr     				 % % % % % %   "* * *: zDFFFFF r-   