
    
j                     N    d dl Z d dlZd dlmZ defdZddZedk(  r e        yy)    N)find_uv_binreturnc                      t        j                  d      } | r| S t         j                  j                  t        j
                  d      }t         j                  j                  |      rt        j
                  S y)zN
    Find the virtual environment path for the current Python executable.
    VIRTUAL_ENVz
pyvenv.cfg )osgetenvpathjoinsysprefixexists)valuevenv_markers     8/DATA/.local/lib/python3.12/site-packages/uv/__main__.py_detect_virtualenvr      sQ     IIm$E '',,szz<8K	ww~~k"zz    c                     t               } t        j                  j                         }t	               }|r|j                  d|       t        j                  |d<   t        j                  dk(  rLdd l	}	 |j                  | gt        j                  dd  |      }t        j                  j                         y t        j                  | | gt        j                  dd  |       y # t        $ r t        j                  d       Y mw xY w)Nr   UV_INTERNAL__PARENT_INTERPRETERwin32r      )env   )r   r   environcopyr   
setdefaultr   
executableplatform
subprocessrunargvKeyboardInterruptexit
returncodeexecvpe)uvr   venvr   completed_processs        r   _runr)      s    	B
**//
CD}d+ .1^^C)*
||w	 */BSXXab\/B L 	"--.


2*SXXab\*4 ! 	HHQK	s   2'C& &DD__main__)r   N)r   r   r&   r   strr   r)   __name__ r   r   <module>r.      s3    	 
 C &52 zF r   