
    ,h                        d dl Z d dlZd dlZd dlmZ d dlmZ d dlZ ej                  d      d        Z	d Z
d Zej                  j                  d	d
      ej                  j                   e        d      ej                  j                  dd ej                  dej                  j!                  dd             ej                  dej                  j!                  dd             ej                  dej                  j!                  dd             ej                  dej                  j!                  dd             ej                  dej                  j!                  d            g      d                      Zd Zy)    N)URLError)urlopenT)autousec                     | j                  g d      j                         }|t        j                  k(  rt	        j
                  d       yy)zY
    pytest_virtualenv may not work. if it doesn't, skip these
    tests. See #1284.
    )python-czimport sys; print(sys.prefix)z/virtualenv is broken (see pypa/setuptools#1284)N)runstripsysprefixpytestskip)venvvenv_prefixs     b/var/www/html/Resume-Scraper/venv/lib/python3.12/site-packages/setuptools/tests/test_virtualenv.pypytest_virtualenv_worksr   
   s:     ((LMSSUKcjj EF !    c                 F    ddddt        |      g}| j                  |       y)zC
    Check setuptools can be installed in a clean environment.
    r   -mpipinstallN)strr	   )venv_without_setuptoolssetuptools_wheelcmds      r   test_clean_env_installr      s(     T5)S1A-B
CC$r   c                      t         j                  j                  dd      s	 t        dd       yy# t        $ r Y yw xY w)NNETWORK_REQUIREDFzhttps://pypi.org   )timeoutT)osenvirongetr   r    r   r   access_pypir%      s>    ::>>,e4	&2
 	  		s   1 	==z*platform.python_implementation() == "PyPy"zChttps://github.com/pypa/setuptools/pull/2865#issuecomment-965834995)reasonz
no networkpip_versionzpip<20.1zsys.version_info >= (3, 12)z-pip 23.1.2 required for Python 3.12 and later)markszpip<21zpip<22zpip<23z,https://github.com/pypa/pip/archive/main.zipz#2975c           	      p   |}|j                  g d       | |j                  ddddd| dg       t        j                  t        j                        5  |j                  g d	       ddd       |j                  ddt        |      g       |j                  ddd
dt        |      g       y# 1 sw Y   FxY w)z7
    Check pip can upgrade setuptools from source.
    )r   r   -UwheelNr   r   r   r   r*   z--retries=1)r   r   zimport setuptoolsz--no-cache-dirz	--upgrade)r	   r   raises
subprocessCalledProcessErrorr   )r'   r   r   setuptools_sdistr   s        r   test_pip_upgrade_from_sourcer0   )   s    j #DHH./(D%D+}UV	z44	5 8678
 	HHeY$4 567HHeY 0+sCS?TUV8 8s   B,,B5c                 Z    |j                   j                  }| j                  g d|       y)zP
    Quick and dirty test to ensure all external dependencies are vendored.
    )r   zsetup.pyz--help)cwdN)configrootdirr	   )	bare_venvrequestsetuptools_dirs      r   test_no_missing_dependenciesr8   l   s$     ^^++NMM2MGr   )r!   r-   r   urllib.errorr   urllib.requestr   r   fixturer   r   r%   markskipifparametrizeparamxfailr0   r8   r$   r   r   <module>rA      s   	  
 ! "  G G%	 0P   %l; ++##-F $ 	
 	++##-F $ 	
 	++##-F $ 	
 	++##-F $ 	
 	:++##7#3	
="%LWM% <	ZW,Hr   