Qf2.&ddlZddlZddlZddlZddlZddlZddlZddlZddlZddl m Z dZ ejddZ daiZGddeZd Zed Zd ed fgZd Zd ZdaddZdZdZddddddddZddddddddZdddZddZy)N) resources)pipPackage)version wheel_name wheel_pathz'/opt/alt/python312/share/python-wheels/ceZdZejdej ZddZdZdZ dZ dZ dZ d Z d Zd Zd Zed Zy) LooseVersionz(\d+ | [a-z]+ | \.)Nc,|r|j|yyN)parse)selfvstrings 9/opt/alt/python312/lib64/python3.12/ensurepip/__init__.py__init__zLooseVersion.__init__ s  JJw  cJ|j|}|turtS|dk(SNr_cmpNotImplementedrothercs r__eq__zLooseVersion.__eq__$' IIe   ! !Av rcJ|j|}|turtS|dkSrrrs r__lt__zLooseVersion.__lt__*' IIe   ! !1u rcJ|j|}|turtS|dkSrrrs r__le__zLooseVersion.__le__0rrcJ|j|}|turtS|dkDSrrrs r__gt__zLooseVersion.__gt__6rrcJ|j|}|turtS|dk\Srrrs r__ge__zLooseVersion.__ge__<rrc||_|jj|Dcgc] }|s|dk7s |}}t|D]\}} t |||<||_ycc}w#t $rY/wxYw)N.)r component_resplit enumerateint ValueErrorr)rrx componentsiobjs rr zLooseVersion.parseBs !%!2!2!8!8!AT!AAQ1PS8a!A T +FAs  #C 1 , " U  s!A#A#A# A(( A43A4c|jSr )rrs r__str__zLooseVersion.__str__Ps ||rcdt|zS)NzLooseVersion ('%s'))strr2s r__repr__zLooseVersion.__repr__Ss$s4y00rc|j|}|turtS|j|jk(ry|j|jkry|j|jkDrytS)Nr)_coercerr)rrs rrzLooseVersion._cmpVs] U# N "! ! <<5== ( <<%-- ' <<%-- 'rcZt||r|St|tr||StSr ) isinstancer5r)clsrs rr:zLooseVersion._coercecs+ eS !L s #u: rr )__name__ __module__ __qualname__recompileVERBOSEr(rrrr!r#r%r r3r6r classmethodr:rrr r s_2::4bjjAL      "1 rr ctjjtdj |}it |<dD]o}dj ||}t j |D]C}|t|t| }tjj|t ||<Eqttt |tS)Nz{}-)z-py2.py3-none-any.whlz-py3-none-any.whlz{}*{})key) ospathjoin_WHEEL_PKG_DIRformat_wheelsgloblenbasenamer5maxr )pkgprefixsuffixpatternrI version_strs r_get_most_recent_wheel_versionrWks WW\\.%,,s*; ..0IIg&Ds6{CK<8K(*(8(8(>GCL %'? s73<\2 33rrpy3ci} tj|}t|}|D]}|j dst D]}|dz}|j |sn9|j|jdd}tjj||}t|d|||<|S#t$rd}YwxYw)NrEz.whl-r) rHlistdirOSErrorsortedendswith_PACKAGE_NAMES startswith removeprefix partitionrIrJ_Package)rIpackages filenamesfilenamenamerSrrs r_find_packagesrh{sHJJt$ y!I  ( "DCZF""6*# ''/99#>qAWW\\$1 !'4< O-  sB66 CCcttSi}tD]"\}}}t||}t||d||<$tr)t tt fdtDr}|a|S)Nc3&K|]}|v ywr rE).0rg dir_packagess r z _get_packages..s?t|#s) _PACKAGES _PROJECTSrMrcrKrhallr_)rdrgrpy_tagrrls @r _get_packagesrrsqH!*gvdmG, !':t<"+%n5 ?? ?#HI Orcd|xsgd|d}tjddd|g}tjjr|j ddt j |d jS) Nz$ import runpy import sys sys.path = z + sys.path sys.argv[1:] = z> runpy.run_module("pip", run_name="__main__", alter_sys=True) z-Wzignore::DeprecationWarningz-cr9z-IT)check)sys executableflagsisolatedinsert subprocessrun returncode)argsadditional_pathscodecmds r_run_piprsz    " #$v  D  $   C yy 1d >>#T * 5 55rc2 tdjS)Nr)rrrrErrrrs ?5 ! ) ))rctjDcgc]}|jds|}}|D]}tj|=tjtjd<ycc}w)NPIP_PIP_CONFIG_FILE)rHenvironr`devnull)kkeys_to_removes r#_disable_pip_configuration_settingsrsW"$DAq||F/CaND  JJqM%'JJBJJ ! Es A*A*Frootupgradeuser altinstall default_pip verbosityc( t||||||y)Nr) _bootstraprs r bootstraprsD'$+"$rc 6 |r |r tdtjd|t|rdtj d<n|sdtj d<t j5}g}tD]\}} } t|| } tjjt| } tjj|| } t| d5}t| d5}|j|jdddddd|j!| ddd d |g}|r|d |gz }|r|d gz }|r|d gz }|r |dd|zzgz }t#g|t$|cdddS#1swYoxYw#1swYsxYw#1swYyxYw)Nz.Cannot use altinstall and default_pip togetherzensurepip.bootstraprENSUREPIP_OPTIONSinstallrbwbz--no-cache-dirz --no-indexz --find-links--root --upgrade--userrZv)r,ruauditrrHrtempfileTemporaryDirectoryrorMrIrJrKopenwritereadappendrr_)rrrrrrtmpdirr~projectrrqrfilename_wheel filename_tmpsfpfpr}s rrrs kIJJII#T*')*6 &' *3 &'  $ $ &&(1 $GWf )'2JWW\\.*EN77<< ;Lnd+s,-HHSXXZ(.,  # #L 1)2+\>6R  Xt$ $D  [M !D  XJ D  S3?*+ +D0$002BC3DD.-,+ ' &s>0A,F F) E7 FAF7F <FF FF)rc( ddl}t}|j|k7r-t d|jd|dt j ytgd}|r |dd|zzgz }tg|ttS#t$rYywxYw) Nrz2ensurepip will only uninstall a matching version (z installed, z available))file) uninstallz-yz--disable-pip-version-checkrZr) r ImportErrorr __version__printrustderrrrreversedr_)rravailable_versionr}s r_uninstall_helperrs    ++ //$L"%[2::  ') >D sY&'' 6d6Xn56 77) sB BBcBddl}|jd}|jdddjt d|jd d d dd d |jddddd|jdddd|jddd|jdddd|jdddd|j |}t |j|j|j|j|j|jS)Nrzpython -m ensurepip)progz --versionrzpip {}z9Show the version of pip that is bundled with this Python.)actionrhelpz-vz --verbosecountrzDGive more output. Option is additive, and can be used up to 3 times.)rdefaultdestrz-Ur store_trueFz8Upgrade pip and dependencies, even if already installed.)rrrrzInstall using the user scheme.rz=Install everything relative to this alternate root directory.)rrz --altinstallz]Make an alternate install, installing only the X.Y versioned scripts (Default: pipX, pipX.Y).z --default-pipz`Make a default pip install, installing the unqualified pip in addition to the versioned scripts.)rrrrrr) argparseArgumentParser add_argumentrLr parse_argsrrrrrrr)argvrparserr}s r_mainr>s^  $ $*? $ @F  * H    k    k G    -    L  1  6    T "D  YY YY..??$$  rr )rArN collectionsrHos.pathrzru sysconfigr importlibrr_ namedtuplercrKrMobjectr rW _PIP_VERSIONrorhrrrnrrrrrrrrErrrs    "; ! !)"I K; M6M^4.e4  L%   :  64* /EE $UE6Dp$%8>:r