
    ϶vgM                        d dl Z d dlZd dlZd dlZd dlmZ d dlZd dlZddlm	Z	m
Z
 ej        d             Zej        d             Z ej        dd	          d
             Zej        d             Zd Z ej        d          d             Z ej        d          d             Zej        d             Zej        d             Zej        d             ZdS )    N)Path   )contextsenvironmentc              #   n  K   t          j                    5 }|                     d|           t          j                    5 }|                     d|           t          j                    5  dV  ddd           n# 1 swxY w Y   ddd           n# 1 swxY w Y   ddd           dS # 1 swxY w Y   dS )za
    Override site.USER_BASE and site.USER_SITE with temporary directories in
    a context.
    zsite.USER_BASEzsite.USER_SITEN)r   tempdirsetattrsave_user_site_setting)monkeypatch	user_base	user_sites      V/var/www/pixelcanvas.ch/venv/lib/python3.11/site-packages/setuptools/tests/fixtures.pyuser_overrider      st      
			 y,i888 	9 0)<<<022                	 	 	 	 	 	 	 	 	 	 	 	 	 	 	                 sY   *B* *B*A;/B;A??BA?BB*B	B*B	B**B.1B.c              #   l   K   |                                  5 }|V  d d d            d S # 1 swxY w Y   d S )N)as_cwd)tmpdirorigs     r   
tmpdir_cwdr      s~      	 D


                 s   )--Tsession)autousescopec                     | j         j                            d          sdS t          j        t
                    5  t          j                            d           ddd           dS # 1 swxY w Y   dS )z
    Workaround pytest-dev/pytest-xdist#376

    ``pytest-xdist`` tends to inject '' into ``sys.path``,
    which may break certain isolation expectations.
    Remove the entry so the import
    machinery behaves the same irrespective of xdist.
    xdistN )	configpluginmanager
has_plugin
contextlibsuppress
ValueErrorsyspathremove)requests    r   workaround_xdist_376r%   !   s     >'227;; 		Z	(	(                   s    A((A,/A,c                     g d}	 t          j        |t          |                      n$# t          $ r t	          j        d           Y nw xY w| dz  S )z<
    Clone the 'sampleproject' and return a path to it.
    )gitclonez%https://github.com/pypa/sampleproject)cwdzUnable to clone sampleprojectsampleproject)
subprocess
check_callstr	Exceptionpytestskip)tmp_pathcmds     r   sample_projectr3   2   sq    
 D
C
CC5cs8}}55555 5 5 53444445o%%s   #* A
Ac                    t          j        || d          5 }t          |                    d          d           }t          |                    d          d           }|r|r||fcd d d            S t	          |j        j        d                                          rJ t          j	        t          j        dddt          |          t          |j        j                  g           t	          |j        j        d                                          rJ t          |                    d                    t          |                    d                    fcd d d            S # 1 swxY w Y   d S )N
dist_buildz*.tar.gzz*.whlzbuild/lib/buildz-mbuildz--outdir)r   session_locked_tmp_dirnextglobr   r   rootdirexistsr+   check_outputr!   
executabler-   )tmp_path_factoryr$   tmpsdistwheels        r   _build_distributionsrB   G   s   		(!<
 
 C	SXXj))400SXXg&&-- 	"U 	"5>C C C C C C C C .0ABBIIKKKKKNHH&''!
 	 	 	 .0ABBIIKKKKKCHHZ(())40A0A+B+BB/C C C C C C C C C C C C C C C C C Cs   AE&2C'E&&E*-E*)r   c                     t          j        d          }|r@t           j                            |          r!t	          |                                          S t          | |          \  }}|S )NPRE_BUILT_SETUPTOOLS_SDISTosgetenvr"   r;   r   resolverB   )r>   r$   prebuiltr@   _s        r   setuptools_sdistrK   b   s`    y566H (BGNN8,, (H~~%%'''#$4g>>HE1L    c                     t          j        d          }|r@t           j                            |          r!t	          |                                          S t          | |          \  }}|S )NPRE_BUILT_SETUPTOOLS_WHEELrE   )r>   r$   rI   rJ   rA   s        r   setuptools_wheelrO   l   s`    y566H (BGNN8,, (H~~%%'''#$4g>>HAuLrL   c                     t          j                    }t          j        | dz            |_        ddg|_        t          |          |_        t          j         d          5  |	                                cddd           S # 1 swxY w Y   dS )z?Virtual env with the version of setuptools under test installedvenv--no-setuptoolsz--wheel=bundleN)
PYTHONPATH)
r   
VirtualEnvr"   r   rootcreate_optsr-   reqr   create)r1   rO   envs      r   rQ   rQ   v   s     
 
"
"CyF*++CH(*:;CO"##CG 
		.	.	.  zz||                 s   "BB
Bc                     t          j                    }t          j        | dz            |_        ddg|_        |                                 |S )z7Virtual env without any version of setuptools installedvenv_without_setuptoolsrR   
--no-wheelr   rT   r"   r   rU   rV   
ensure_envr1   rY   s     r   r[   r[      sJ     
 
"
"Cy$==>>CH(,7CONNJrL   c                     t          j                    }t          j        | dz            |_        g d|_        |                                 |S )z1Virtual env without any common packages installed	bare_venv)rR   z--no-pipr\   z	--no-seedr]   r_   s     r   ra   ra      sJ     
 
"
"CyK/00CHPPPCONNJrL   )r   rF   r+   r!   pathlibr   r"   r/   r   r   r   fixturer   r   r%   r3   rB   rK   rO   rQ   r[   ra    rL   r   <module>re      s       				     



         # # # # # # # # 
 
 
   
 I...  /.  	& 	& 	&(C C C6 i     !  i     !    *        rL   