\hddlZddlZddlZddlZddlZddlZddlZddlmZddl m Z ddl m Z m Z mZmZmZmZmZmZddlmZddlmZddlmZddlmZdd lmZdd lmZdd l m!Z!dd l"m#Z#m$Z$dd l%m&Z&m'Z'ddl(m)Z)ddl*m+Z+m,Z,m-Z-m.Z.ddl/m0Z0ddl1m2Z2ddl3m4Z4ddl5m6Z6ddl7m8Z8ddl9m6Z:ddl;mm?Z?ddl@mAZAmBZBddlCmDZDddlEmFZFddlGmHZHddlImJZJmKZKmLZLmMZMmNZNmOZOmPZPmQZQddlRmSZSddlTmUZUddlVmWZWmXZXddlYmZZZdd l[m\Z\dd!l]m^Z^eje`ZaGd"d#Zbd$ebd%ecfd&Zdd'ed(eebd)ecd%eefd*Zfd'ed(eebd%dfd+Zgy),N)Values)Path)Any CollectionDictIterableListOptionalSequenceUnion)Marker) Requirement) SpecifierSet)canonicalize_name)Version)parse)BuildBackendHookCaller)BuildEnvironmentNoOpBuildEnvironment)InstallationErrorPreviousBuildDirError) get_scheme)BaseDistributionget_default_environmentget_directory_distributionget_wheel_distribution)FilesystemWheel) DirectUrl)Link)generate_metadata)generate_editable_metadata)install_editable) install_wheel)load_pyproject_tomlmake_pyproject_path)UninstallPathSet) deprecated)Hashes) ConfiguredBuildBackendHookCallerask_path_exists backup_dir display_pathhide_urlis_installable_dirredact_auth_from_requirementredact_auth_from_url) safe_extra)runner_with_spinner_message) TempDirectory tempdir_kinds) unpack_file)running_under_virtualenv)vcsc eZdZdZ dLdddddddddeedeeedfded ee d ee d eed ed ee edee ee efdee eeee effdede edededdfdZdefdZdefdZdefdZedeefdZej*defdZedefdZedefdZedefdZdMdeeedefdZedefd ZdNd!edefd"Zdeefd#Z d$ed%ed&edefd'Z!dOd(Z"dOd)Z#d*eddfd+Z$edefd,Z%edefd-Z&edefd.Z'edefd/Z(edefd0Z)edefd1Z*dOd2Z+dOd3Z,dOd4Z-ede.fd5Z/de0fd6Z1dOd7Z2 dPd8ed%ed&eddfd9Z3d:e4ddfd;Z5dOd<Z6dOd=Z7 dPd>ed?edee8fd@Z9dAedBedCedefdDZ:d$eeddfdEZ; dQd eer?r@rAreturnct|t|tsJ|||_||_| |_||_||_d|_|j r[|sJ|jrKtjjtjj|j|_|#|r!|jrt|j}|x|_|_d|_d|_d|_|j r1|j jr|j j|_| r| |_n#|r|j*|_nt-|_||r |j.}||_d|_d|_d|_d|_|r|ng|_| r| ni|_| |_d|_ | |_!||_"tG|_$d|_%d|_&g|_'d|_(||_)|j>r+|jRdurtTjWd|d|_)d|_,d|_-y)NFzG--no-use-pep517 ignored for %s because --config-settings are specified.T). isinstancerrBrCr>rDrA source_diris_fileospathnormpathabspath file_pathurlrrE original_linkcached_wheel_source_link download_infolocal_file_pathr?setmarkerrF satisfied_byshould_reinstall_temp_build_dirinstall_succeededr;r<r=preparedr@rHr build_envmetadata_directorypyproject_requiresrequirements_to_checkpep517_backendrGloggerwarningneeds_more_preparation_archive_source)selfrBrCrDrErFrGrHr;r<r=r>r?r@rAs `/root/niggaflix-v3/playground/venv/lib/python3.12/site-packages/pip/_internal/req/req_install.py__init__zInstallRequirement.__init__Hs ${jk:?C?:$$  &<#*. ==K4||"$''"2"2277??4>>3R"S nB,8Lb. +  +?+A 268<13"AE%   %'? #DO',#04cP|jrGt|j}|jrT|dt|jjz }n.|jr t|jj}nd}|j @|j j t|j j }nd}|d|z }|jrLt|jtr |j}n|jj}|r |d|dz }|S)Nz from zz in z (from )) rBr/rEr0rSrZlocationr,rCrKstr from_path)rhsrorCs ri__str__zInstallRequirement.__str__s 88,TXX6Ayyv2499==ABCC YY$TYY]]3A&A    (  ))5'(9(9(B(BC% 4z" "A ??$//3/,0OO !__668 wzl!,,rkcvdj|jjt||jS)Nz<{} object: {} editable={!r}>)format __class____name__rprDrhs ri__repr__zInstallRequirement.__repr__s..55 NN # #SY   rkct|t}fdt|D}dj|jjdj |S)z5An un-tested helper for getting state, for debugging.c32K|]}|d|yw)=Nr:).0attr attributess ri z2InstallRequirement.format_debug..s"JDD6:d+./Jsz<{name} object: {{{state}}}>z, )namestate)varssortedrurvrwjoin)rhnamesrrs @ri format_debugzInstallRequirement.format_debugsU$Z z"JF5MJ-44(())E"5  rkcH|jy|jjSN)rBrrxs rirzInstallRequirement.names 88 xx}}rkc@|jsy|jsJ|j5td}|jj |5d|jj vcdddcdddS#1swYnxYw dddy#1swYyxYw)NFz1Checking if build backend supports build_editablebuild_editable)rGrcr_r2subprocess_runner_supported_features)rhrunners risupports_pyproject_editablez.InstallRequirement.supports_pyproject_editables"""" ^^ U0CF$$66v> U'4+>+>+R+R+TT U U  U U U U U  U U Us#'BA>+ B>B BBcJ|jJ|jjSr)rB specifierrxs rirzInstallRequirement.specifiers"xx###xx!!!rkc|jduS)z7Whether this requirement was specified as a direct URL.N)rTrxs ri is_directzInstallRequirement.is_directs!!--rkc|jJ|jj}t|dk(xr tt |j dvS)zReturn whether I am pinned to an exact version. For example, some-package==1.2 is pinned; some-package>1.2 is not. >=====)rBrlennextiteroperator)rh specifierss ri is_pinnedzInstallRequirement.is_pinned sL xx###XX'' :!#XT*-=(>(G(G=(XXrkextras_requestedcN|sd}jtfd|DSy)N)c3K|]q}jjd|ixsNjjdt|ixs&jjdt|isyw)extraN)rFevaluater1r)r}rrhs rirz3InstallRequirement.match_markers..s~   %%w&67N<<((':e3D)EFN<<(('3DU3K)LM NsA7A:T)rFany)rhrs` ri match_markersz InstallRequirement.match_markerss9 %  << # .  rkc,t|jS)zReturn whether any known-good hashes are specified as options. These activate --require-hashes mode; hashes specified as part of a URL do not. )boolr<rxs rihas_hash_optionsz#InstallRequirement.has_hash_options(sD%%&&rktrust_internetcZ|jj}|r |j}n'|jr|jr |j }nd}|rO|j rC|jJ|j|jgj|j t|S)aReturn a hash-comparer that considers my option- and URL-based hashes to be known-good. Hashes in URLs--ones embedded in the requirements file, not ones downloaded from an index server--are almost peers with ones from flags. They satisfy --require-hashes (whether it was implicitly or explicitly activated) but do not activate it. md5 and sha224 are not allowed in flags, which should nudge people toward good algos. We always OR all hashes together, even ones from URLs. :param trust_internet: Whether to trust URL-based (#md5=...) hashes downloaded from the internet, as by populate_link() N) r<copyrErr@rThash hash_name setdefaultappendr()rhr good_hashesrEs rihasheszInstallRequirement.hashes2s'',,. 99D ^^ 2 2%%DD DII>>- --  " "4>>2 6 = =dii Hk""rkc|jyt|j}|jrKt|jtr |j}n|jj }|r|d|zz }|S)z8Format a nice indicator to show where this "comes from" Nz->)rBrprCrKrq)rhrrrCs rirqzInstallRequirement.from_pathMsc 88  M ??$//3/!__ !__668 TJ&&rk build_dir autodeleteparallel_buildsc|J|j.|jjsJ|jjS|j6ttj d|_|jjSt |jj}|r#|dtjj}tjj|s+tjd|tj|tjj!||}|rdnd}t||tj djS)NT)kindglobally_managed_zCreating directory %sF)rOdeleterr)r\rOrBr3r4 REQ_BUILDrruuiduuid4hexrNexistsrddebugmakedirsr)rhrrrdir_nameactual_build_dir delete_args riensure_build_locationz(InstallRequirement.ensure_build_location\s"$$$    +'',, ,,'',, , 88 $1",,t$D '',, ,*$((--8 "1TZZ\%5%5$67Hww~~i( LL0) < KK "77<< 8<(TU !((!  $  rkc&|jJ|jJ|jJtt |jdt rd}nd}t dj|jd||jdg|_y)z*Set requirement after generating metadata.NrrrrName)rBmetadatarLrK parse_versionrrr)rhops ri_set_requirementz#InstallRequirement._set_requirementsxx}}(((*** mDMM)$<=w GBB GGMM&)MM),  rkc|jJt|jd}t|jj|k(rytj d|j||jt ||_y)NrzeGenerating metadata for package %s produced metadata for project name %s. Fix your #egg=%s fragments.)rBrrrrdrer)rh metadata_names riwarn_on_mismatching_namez+InstallRequirement.warn_on_mismatching_namesqxx###)$--*?@ TXX]] +} <   ! II  II  }-rk use_user_sitec|jytj|jj}|sy|jjj |j d}|sbd|_|rO|jrd|_ ytr:|jr-td|jd|jd|_ yyy|jrd|_ d|_y||_y)zFind an installed distribution that satisfies or conflicts with this requirement, and set self.satisfied_by or self.should_reinstall appropriately. NT) prereleaseszNWill not install to the user site because it will lack sys.path precedence to rm)rBrget_distributionrrcontainsversionrZ in_usersiter[r6in_site_packagesrraw_namerorD)rhr existing_distversion_compatibles richeck_if_existsz"InstallRequirement.check_if_existss 88  /1BB488==Q  !XX//88  ! !9 " $D  ,,,0D)-/M4R4R+77D7M7M6NO+4457 )-%5S/}}(,%%)!$1!rkcH|jsy|jjS)NF)rEis_wheelrxs rirzInstallRequirement.is_wheelsyyyy!!!rkc|jduSr)rUrxs riis_wheel_from_cachez&InstallRequirement.is_wheel_from_caches,,D88rkc|js Jd|tjj|j|jxr|jj xsdS)NNo source dir for r)rLrNrOrrEsubdirectory_fragmentrxs riunpacked_source_directoryz,InstallRequirement.unpacked_source_directorysQ;"4TF ;;ww|| OOTYYJ499+J+JPb  rkc|js Jd|tjj|jd}|S)Nrzsetup.pyrLrNrOrr)rhsetup_pys ri setup_py_pathz InstallRequirement.setup_py_paths:;"4TF ;;77<< > > Krkc|js Jd|tjj|jd}|S)Nrz setup.cfgr)rh setup_cfgs risetup_cfg_pathz!InstallRequirement.setup_cfg_paths;;"4TF ;;GGLL!?!?M rkcX|js Jd|t|jS)Nr)rLr%rrxs ripyproject_toml_pathz&InstallRequirement.pyproject_toml_paths,;"4TF ;;"4#A#ABBrkct|j|j|jt |}||j rJd|_yd|_|\}}}}||_||_t||j|||_ y)aALoad the pyproject.toml file. After calling this routine, all of the attributes related to PEP 517 processing for this requirement have been set. In particular, the use_pep517 attribute can be used to determine whether we should follow the PEP 517 or legacy (setup.py) code path. NFT) backend_path) r$rGrrrpr=rbrar)rrc)rhpyproject_toml_datarequiresbackendcheckrs rir$z&InstallRequirement.load_pyproject_tomls2 OOT55t7I7I3t9   &++ ++#DO 1D.'5,%*""*>   * * %  rkc|jr|jrt|jsctjj |j s9tjj |jstd|dyyyyy)zCheck that an editable requirement if valid for use with PEP 517/518. This verifies that an editable that has a pyproject.toml either supports PEP 660 or as a setup.py or a setup.cfg zProject z has a 'pyproject.toml' and its build backend is missing the 'build_editable' hook. Since it does not have a 'setup.py' nor a 'setup.cfg', it cannot be installed in editable mode. Consider using a build backend that supports PEP 660.N) rDrGrrNrOisfilerrrrxs riisolated_editable_sanity_checkz1InstallRequirement.isolated_editable_sanity_checks MM446GGNN4#5#56GGNN4#6#67#4&!HI 877  rkc|js Jd||jxsd|j}|jr|jJ|j rD|j r8|jr(t|j|j||_ net|j|j||_ n=t|j|j|j|j||_ |js|j!n|j#|j%y)zEnsure that project metadata is available. Under PEP 517 and PEP 660, call the backend hook to prepare the metadata. Under legacy processing, call setup.py egg-info. rzfrom N)r_rdetails)r_rrLrHr)rLrrErGrcrDrArr!r_r`r generate_metadata_legacyrrrHrrassert_source_matches_version)rhrs riprepare_metadataz#InstallRequirement.prepare_metadata-s  ;"4TF ;;))2tyyk2 ??&&2 22 //446*D"nn //#+' +<"nn //#+' '?.."0099 'D #yy  ! ! #  ) ) + **,rkcpt|ds|jj|_|jS)N _metadata)hasattrget_distrrrxs rirzInstallRequirement.metadataYs)t[)!]]_55DN~~rkc&|jrt|jS|jrV|jrJ|jJt t |jt|jjStd|d)NzInstallRequirement zC has no metadata directory and no wheel: can't make a distribution.) r`rrWrrBrrrrAssertionErrorrxs rirzInstallRequirement.get_dist`s  " "-d.E.EF F  ! !dmm88' '') 4 45!$((--0 !$() *  rkcH|js Jd||jd}|jrF|jjr0||jjvrtj d||ytj dt|j||y)Nrrz'Requested %s, but installing version %sz;Source in %s has version %s, which satisfies requirement %s)rLrrBrrdrerr,)rhrs rirz0InstallRequirement.assert_source_matches_versionns;"4TF ;;-- * 88**wdhh>P>P/P NN9  LLMT__-  rk parent_dircP|j|j||||_yy)aAEnsure that a source_dir is set. This will create a temporary build dir if the name of the requirement isn't known yet. :param parent_dir: The ideal pip parent_dir for the source_dir. Generally src_dir for editables and build_dir for sdists. :return: self.source_dir N)rr)rLr)rhrrrs riensure_has_source_dirz(InstallRequirement.ensure_has_source_dirs3 ?? ""88% /9DO #rkarchive_sourcec.|jJ||_yr)rg)rhrs rineeds_unpacked_archivez)InstallRequirement.needs_unpacked_archives##+++-rkc|jJ|j*tt|j|jyt |jrt d|d|jdy)z6Ensure the source directory has not yet been built in.Nz%pip can't proceed with requirements 'z)' due to a pre-existing build directory (z). This is likely due to a previous installation that failed . pip is being responsible and not assuming it can delete this. Please delete it and try again.)rLrgr5rpr.rrxs riensure_pristine_source_checkoutz2InstallRequirement.ensure_pristine_source_checkoutsx***    + D0014?? C  0(7v>1150AB22  1rkc|js!tjd|jy|jsJ|jsJ|jj dk(ryt j|jj }|sJd|jjt|jj}|j|j|dy)Nz>Cannot update repository at %s; repository location is unknownfilezUnsupported VCS URL r)rS verbosity) rErdrrLrDschemer7get_backend_for_schemerSr-obtain)rh vcs_backend hidden_urls riupdate_editablez"InstallRequirement.update_editablesyy LLP  }}} 99  v % 001A1AB B2499==/BB{diimm, 4?? aHrk auto_confirmverbosec<|jsJtj|jj}|s!tj d|jytj d|tj|}|j|||S)a Uninstall the distribution currently satisfying this requirement. Prompts before removing or modifying files unless ``auto_confirm`` is True. Refuses to delete or modify files outside of ``sys.prefix`` - thus uninstallation within a virtual environment can only modify that virtual environment, even if the virtualenv is linked to global site-packages. z#Skipping %s as it is not installed.NzFound existing installation: %s) rBrrrrdreinfor& from_distremove)rhrrdistuninstalled_pathsets ri uninstallzInstallRequirement.uninstallsyxxx&(99$((--H NN@$)) L 5t<.88>""<9""rkrO parentdirrootdircdtdtdtfd}|jJtjj ||}|||}|jj dz|zS)NrprefixrIc|j|tjjzs Jd|d||t |dzd}|j tjjd}|S)Nzname z doesn't start with prefix r/) startswithrNrOseprreplace)rrs ri_clean_zip_namez=InstallRequirement._get_archive_name.._clean_zip_namest??$ Eth9&D EF a)*D<< S1DKrkr )rprBrNrOrr)rhrOrrr$rs ri_get_archive_namez$InstallRequirement._get_archive_namesf # s s xx###ww||It,tW-xx}}s"T))rkc@|jsJ|yd}dj|j|jd}tj j ||}tj j|rtdt|dd}|dk(rd }n|d k(r5tjd t|t j|nj|d k(rKt|}tjd t|t|tj||n|dk(rt!j"d|syt%j&|d t$j(d}|5tj j+tj j-|j.}t j0|D]\} } } | D]G} |j3| | |} t%j4| dz}d|_|j9|dI| D]H}|j3|| |}tj j | |}|j;||J dddtj=dt|y#1swY)xYw)z}Saves archive to provided build_dir. Used for saving downloaded VCS requirements as part of `pip download`. NTz {}-{}.ziprz The file z- exists. (i)gnore, (w)ipe, (b)ackup, (a)bort )iwbar'Fr(z Deleting %sr)zBacking up %s to %sr*) allowZip64)rrr irzSaved %s)rLrurrrNrOrrr*r,rdrerr+shutilmovesysexitzipfileZipFile ZIP_DEFLATEDnormcaserQrwalkr%ZipInfo external_attrwritestrwriter)rhrcreate_archive archive_name archive_pathresponse dest_file zip_outputdirdirpathdirnames filenamesdirname dir_arcnamezipdirfilename file_arcnames riarchivezInstallRequirement.archivesT    "))$))T]]95MN ww||I|< 77>>, '&L678%%$H 3!&S}l<.HI ,'S&|4 ) . +  L)4S  __       =''""277??43Q3Q#RSC02  =,9'4G"&"8"8") ##9#K %__[3->?F+6F(''34!*=H#'#9#9 ") #$:$L "ww||GX>H$$X|<= = =*  J \ :;+ = =s -C>JJroothomerwarn_script_location pycompilec |jJt|jj||||j|}|jr|j s~|j rtjd|t||ng||||jj|j|j|j|j d|_ y|j sJ|jsJt|jj|j|t!|j|||j"r |j$nd|j&d|_ y)N)userrKrJrHrz--config-settings ignored for legacy editable install of %s. Consider upgrading to a version of setuptools that supports PEP 660 (>= 64).) r;rrKrrrrHr_rT)r req_descriptionrMrL direct_url requested)rBrrrHrDrr=rdreinstall_editable_legacyrr_rr]rWr#rprrVr@) rhr;rJrKrrLrrMr s riinstallzInstallRequirement.install+s/xx### HHMM]]   ==##5  $1?1K~QS+XX]]"00..*.*H*H &*D " }}}#### HHMM  M!5-1^^t))(( "&rk)FNNNFr)T)rIN)FF)NNNNTFT)>rw __module__ __qualname____doc__r rr rprrr r rrrjrsryrpropertyr functools lru_cacherrrrrrrrr(rrqrrrrrrrrrrr$rrrrrrrrrrrrr&rr%rIr rTr:rkrir9r9As#$(%)~4/37;FJ "$#',!~4 k "~4U3(<#<=>~4 ~4 tn ~4 &! ~4TN~4~4!c+~4tCcN34~4"$sE#tCy.,A'A"BC~4~43~4~4 !%!~4" #~4@0 #  c  hsm Y UT U U"<"".4..Y4YYhx}.EQU"'$''#T#V#6 8C= ))*.)AE) )V ,.$#2T#2d#2L"$"" 9T99  3  s  CSCC 8**-X#  *  *! %    ,.T.d.$I*;@# #37# " ##4 *c *c *C *C *A<#A<4Ars! SSS0:991@>JM. 85*EWAL<6-   5FE5C!   8 $a &a &H'9c8t,>'?QU3 3 ! "3 3rk