\bgddlZddlZddlZddlmZddlmZddlZejddZ dZ dZ ej d d ej e d ej d dejdej dd ejdej dd ejdej dd ejdej dd ejdej d gdZdZdS)N)URLError)urlopenT)autousec|gd}|tjkrt jddSdS)zY pytest_virtualenv may not work. if it doesn't, skip these tests. See #1284. )python-czimport sys; print(sys.prefix)z/virtualenv is broken (see pypa/setuptools#1284)N)runstripsysprefixpytestskip)venv venv_prefixs q/builddir/build/BUILD/cloudlinux-venv-1.0.7/venv/lib/python3.11/site-packages/setuptools/tests/test_virtualenv.pypytest_virtualenv_worksr sT ((LLLMMSSUUKcj   EFFFFF! cXddddt|g}||dS)zC Check setuptools can be installed in a clean environment. r-mpipinstallN)strr )venv_without_setuptoolssetuptools_wheelcmds rtest_clean_env_installrs7 T5)S1A-B-B CC$$$$$rctjdds$ tddn#t$rYdSwxYwdS)NNETWORK_REQUIREDFzhttps://pypi.org)timeoutT)osenvirongetrrrr access_pypir%s` :>>,e 4 4  & 2 2 2 2 2   55  4s4 AAz*platform.python_implementation() == "PyPy"zChttps://github.com/pypa/setuptools/pull/2865#issuecomment-965834995)reasonz no network pip_versionzpip<20.1zsys.version_info >= (3, 12)z-pip 23.1.2 required for Python 3.12 and later)markszpip<21zpip<22zpip<23z,https://github.com/pypa/pip/archive/main.zipz#2975c |}|gd||ddddd|dgtjtj5|gd dddn #1swxYwY|ddt |g|ddd d t |gdS) z7 Check pip can upgrade setuptools from source. )rr-UwheelNrrrrr*z --retries=1)rrzimport setuptoolsz--no-cache-dirz --upgrade)r r raises subprocessCalledProcessErrorr)r'rrsetuptools_sdistrs rtest_pip_upgrade_from_sourcer0)sj #DHH . . ./// (D%D+}UVVV z4 5 588 666777888888888888888  HHeY$4 5 5 6777HHeY 0+sCS?T?T UVVVVVsA::A>A>cP|jj}|gd|dS)zP Quick and dirty test to ensure all external dependencies are vendored. )rzsetup.pyz--help)cwdN)configrootdirr ) bare_venvrequestsetuptools_dirs rtest_no_missing_dependenciesr8ls1^+N MM222MGGGGGr)r!r-r urllib.errorrurllib.requestrr fixturerrr%markskipif parametrizeparamxfailr0r8r$rrrAsm  !!!!!!"""""" GGG%%%   0 P %l;;  +##-F$     +##-F$     +##-F$     +##-F$     :+##7#33   ="%%LWWM%%<; ZW,HHHHHr