
    si
                     x    S r SSKrSSKJr  SSKJr  SSKJr  SSK	J
r
Jr  SSKJr  SSKJr  \" \5      rS	 rS
 rg)zPip-flavored installer.    N)	getLogger   )Utf8NamedTemporaryFile)get_pip_installed_packagespip_subprocess)CONDA_SESSION_SCHEMES)get_spinnerc                    UR                   R                  SS5      S   nU[        ;   a  SnOa [        R                  " [        R
                  " UR                   5      5      n[        R                  " U[        R                  5      (       d  SnSn [        SSSUSS	9nUR                  S
R                  U5      5        UR                  5         SSSUR                  S/n[        XUS9u  pUb|  [        R                   " UR                  5      (       aW  S[        R"                  ;  a!  [        R$                  " UR                  5        O"[&        R)                  SUR                   35        [+        U	5      $ ! [         a    Sn Nf = f! Ub~  [        R                   " UR                  5      (       aX  S[        R"                  ;  a!  [        R$                  " UR                  5        f [&        R)                  SUR                   35        f f f = f)a  
Installs the pip dependencies in specs using a temporary pip requirements file.

Args
----
prefix: string
  The path to the python and pip executables.

specs: iterable of strings
  Each element should be a valid pip dependency.
  See: https://pip.pypa.io/en/stable/user_guide/#requirements-files
       https://pip.pypa.io/en/stable/reference/pip_install/#requirements-file-format
z://   r   Nwz	condaenv.z.requirements.txtF)modeprefixsuffixdirdelete
installz-Uz-rz--exists-action=b)cwdCONDA_TEST_SAVE_TEMPSz8CONDA_TEST_SAVE_TEMPS :: retaining pip requirements.txt )filesplitr   opdirnameabspathosaccessW_OKAttributeErrorr   writejoinclosenamer   isfileenvironremovelogwarningr   )r   specsargs_kwargs
url_schemepip_workdirrequirementspip_cmdstdoutstderrs              8lib/python3.13/site-packages/conda/env/installers/pip.py_pip_install_via_requirementsr3      s    *1-J**	**RZZ		%:;K99["''22" L-&
 	499U+, dD,*;*;=PQ'[I #		,2C2C(D(D&bjj8		,++,N|O`O`Nab &f--9  	K	* #		,2C2C(D(D&bjj8		,++,N|O`O`Nab	 )E#s    A E5 AF 5FFBH
c                  d    [        S5         [        U 0 UD6sS S S 5        $ ! , (       d  f       g = f)NzInstalling pip dependencies)r	   r3   )r)   r+   s     r2   r   r   F   s$    	2	3,d=f= 
4	3	3s   !
/)__doc__r   os.pathpathr   loggingr   auxlib.compatr   env.pip_utilr   r   gateways.connection.sessionr   	reportersr	   __name__r&   r3   r        r2   <module>r@      s4     	   3 F @ $2.j>r?   