o
    2g                     @  sj   d Z ddlmZ ddlZddlZddlZddlZejej	e
dZdZddd	Zed
kr3e  dS dS )zMypyc command-line tool.

Usage:

    $ mypyc foo.py [...]
    $ python3 -c 'import foo'  # Uses compiled 'foo'


This is just a thin wrapper that generates a setup.py file that uses
mypycify, suitable for prototyping and testing.
    )annotationsN..zfrom setuptools import setup
from mypyc.build import mypycify

setup(name='mypyc_output',
      ext_modules=mypycify({}, opt_level="{}", debug_level="{}"),
)
returnNonec                  C  s   d} zt |  W n	 ty   Y nw t dd}t dd}t j| d}t|d}|t	t
jdd  || W d    n1 sEw   Y  t j }t jt jtd	}|t j |d
d |d
< tjt
j|ddg|d}t
|j d S )NbuildMYPYC_OPT_LEVEL3MYPYC_DEBUG_LEVEL1zsetup.pyw   r   
PYTHONPATH 	build_extz	--inplace)env)osmkdirFileExistsErrorgetenvpathjoinopenwritesetup_formatformatsysargvenvironcopydirname__file__pathsepget
subprocessrun
executableexit
returncode)	build_dir	opt_leveldebug_level
setup_filefr   	base_pathcmd r/   F/home/garg/my-data/venv/lib/python3.10/site-packages/mypyc/__main__.pymain    s"    
r1   __main__)r   r   )__doc__
__future__r   r   os.pathr#   r   r   r   r   r    r-   r   r1   __name__r/   r/   r/   r0   <module>   s    


