
    jLD                    \   S r SSKJr  SSKrSSKrSSKJr  SSKJr  SSK	J
r
JrJr  SSKJrJrJr  SSKJr  SS	KJr  SS
KJr  SSKJr  SSKJr  SSKJrJrJr  SSKJr  SSK J!r!  SSK"J#r#  SSK$J%r%  SSK&J'r'  SSK(J)r)  SSK*J+r+  SSK,J-r-J.r.J/r/J0r0J1r1  SSK2J3r3J4r4  SSK5J6r6  SSK7J8r8  SSK9J:r:  SSK;J<r<  SSK=J>r>  SSK?J@r@JArA  SSKBJCrCJDrDJErE  \R                  " \G5      rHS%S jrI\ER                  \ER                  \ER                  /rM\" SS S!9rN    S&S" jrO          S'S# jrP " S$ S \5      rQg)(zContains the RequirementCommand base class.

This class is in a separate module so the commands that do not always
need PackageFinder capability don't unnecessarily import the
PackageFinder machinery and all its vendored dependencies, etc.
    )annotationsN)partial)Values)AnyCallableTypeVar)BuildEnvironmentInstaller"InprocessBuildEnvironmentInstaller#SubprocessBuildEnvironmentInstaller)
WheelCache)
cmdoptions)make_target_python)IndexGroupCommand)SessionCommandMixin)CommandErrorPreviousBuildDirErrorUnsupportedPythonVersion)LinkCollector)PackageFinder)SelectionPreferences)TargetPython)
PipSession)BuildTracker)RequirementPreparer)install_req_from_editableinstall_req_from_line#install_req_from_parsed_requirementinstall_req_from_pylock_packageinstall_req_from_req_string)PEP723Exceptionpep723_metadata)parse_dependency_groups)parse_requirements)InstallRequirement)BaseResolver)check_requires_python)is_valid_pylock_filenameselect_from_pylock_path_or_url)TempDirectoryTempDirectoryTypeRegistrytempdir_kindsc                F    [         R                  R                  S5      S:H  $ )z
Check if regular constraints should be ignored because
we are in a isolated build process and build constraints
feature is enabled but no build constraints were passed.
 _PIP_IN_BUILD_IGNORE_CONSTRAINTS1)osenvirongetoptionss    n/root/GenerationalWealth/GenerationalWealth/venv/lib/python3.13/site-packages/pip/_internal/cli/req_command.py!should_ignore_regular_constraintsr5   @   s     ::>><=DD    	_CommandTRequirementCommand)boundc                &   ^ ^ SS jmSUU 4S jjnU$ )zFDecorator for common logic related to managing temporary
directories.
c                B    [          H  nU R                  US5        M     g NF)KEEPABLE_TEMPDIR_TYPES
set_delete)registryts     r4   configure_tempdir_registry0with_cleanup.<locals>.configure_tempdir_registry[   s    'A5) (r6   c                   > U R                   c   eUR                  (       a  T" U R                   5         T" XU5      $ ! [         a    T" U R                   5        e f = fN)tempdir_registryno_cleanr   )selfr3   argsrA   funcs      r4   wrapperwith_cleanup.<locals>.wrapper_   s`    $$000&t'<'<=	t,,$ 	 't'<'<=	s	   > A)r?   r*   returnNone)rG   r7   r3   r   rH   	list[str]rL   int )rI   rJ   rA   s   ` @r4   with_cleanuprQ   T   s    *  Nr6   c           	         / nU  H=  n[        USUUUS9 H)  n[        UUR                  SS9nUR                  U5        M+     M?     U$ )NT)
constraintfinderr3   sessionFisolateduser_supplied)r#   r   isolated_modeappend)constraint_filesrT   r3   rU   requirementsfilename
parsed_req
req_to_adds           r4   parse_constraint_filesr`   p   sd     L$,
J = ..#J
 
+
 % r6   c                  $  ^  \ rS rSrS
U 4S jjr\SS j5       r\  S                 SS jj5       r\       S                     SS jj5       r	          SS jr
\SS j5       r  S         SS jjrS	rU =r$ )r8      c                   > [         TU ]  " U0 UD6  U R                  R                  [        R
                  " 5       5        U R                  R                  [        R                  " 5       5        g rD   )super__init__cmd_opts
add_optionr   dependency_groupsrF   )rG   rH   kw	__class__s      r4   re   RequirementCommand.__init__   sK    $%"%  !=!=!?@  !4!4!67r6   c                &    SU R                   ;   a  gg)zEDetermines which resolver should be used, based on the given options.zlegacy-resolverlegacy
resolvelib)deprecated_features_enabledr2   s    r4   determine_resolver_variant-RequirementCommand.determine_resolver_variant   s      C CCr6   c	                Z   UR                   n	U	c   eSn
U R                  U5      nUS:X  a,  SUR                  ;   nU(       a  [        R	                  S5        O)Sn
SnSUR                  ;   a  [        R	                  S5        [        US/ 5      nSUR                  ;   nS	UR                  ;   a-  [        XX$5      n[        UUUU[        UR                  5      S
9nO[        UUUS9n[        U	UR                  UUR                  UUR                  UUUR                  UUR                   UUUU
S9$ )zA
Create a RequirementPreparer instance for the given parameters.
Frn   z	fast-depszpip is using lazily downloaded wheels using HTTP range requests to obtain dependency information. This experimental feature is enabled through --use-feature=fast-deps and it is not ready for production.Tz;fast-deps has no effect when used with the legacy resolver.build_constraintszbuild-constraintzinprocess-build-deps)rT   build_trackerrs   	verbositywheel_cache)rs    build_constraint_feature_enabled)	build_dirsrc_dirdownload_dirbuild_isolationbuild_isolation_installercheck_build_depsrt   rU   progress_barrT   require_hashesuse_user_site
lazy_wheelru   legacy_resolver)pathrp   features_enabledloggerwarninggetattrr`   r
   r   	cache_dirr   r   ry   r{   r}   r~   r   )clstemp_build_dirr3   rt   rU   rT   r   rz   ru   temp_build_dir_pathr   resolver_variantr   rs   rw   build_constraint_reqsenv_installers                    r4   make_requirement_preparer,RequirementCommand.make_requirement_preparer   sa    -11"...99'B|+$(@(@@J" #OJg666Q
 $G-@"E'":":: 	)
 "W%=%==$:!7%! ?+"7#&w'8'89M @"31QM #)OO%#33&3$55' --"11'!+
 	
r6   c                   [        [        UR                  S9nU R                  U5      nUS:X  aO  SSKnUR
                  R                  R                  R                  R                  UUUUUUR                  UUUU	U
S9$ SSKnUR
                  R                  R                  R                  R                  UUUUUUR                  UUUU	U
S9$ )z6
Create a Resolver instance for the given parameters.
)rW   rn   r   N)preparerrT   rv   make_install_reqr   ignore_dependenciesignore_installedignore_requires_pythonforce_reinstallupgrade_strategypy_version_info)r   r   rY   rp   ,pip._internal.resolution.resolvelib.resolver	_internal
resolutionrn   resolverResolverr   (pip._internal.resolution.legacy.resolverrm   )r   r   rT   r3   rv   r   r   r   r   r   r   r   r   pips                 r4   make_resolver RequirementCommand.make_resolver   s    " #'**
 99'B |+?==++66??HH!'!1+$+$?$?!1'= /!1 / I   	8}}''..77@@#-' ' ; ;-#9+-+ A 
 	
r6   c                   / n[        U5      (       d(  [        UR                  X2U5      nUR                  U5        U HM  nUR	                  5       (       d  M  [        USUR                  S[        USS5      S9nUR                  U5        MO     UR                  (       aB  [        UR                  5       H)  n[        UUR                  SS9nUR                  U5        M+     UR                   H5  n[        USUR                  [        USS5      S9nUR                  U5        M7     UR                   H  n	[        U	5      (       aO  [         R#                  S5        [%        XS9 H+  u  pUR                  ['        U
UU	UR(                  SS	95        M-     Mb  [+        XX$S
9 HV  n[-        UUR                  SUR.                  (       a  UR.                  R1                  S5      OSS9nUR                  U5        MX     M     UR2                  (       a  [5        UR2                  5      S:  a  [7        S5      eUR2                  S   n [9        U5      nUR1                  SS5      nU(       aU  UR>                  (       dD  [A        U5      n[C        UURD                  S9(       d   [G        SU< SURH                   SU< 35      eUR1                  S/ 5       H)  n[        UUR                  SS9nUR                  U5        M+     [K        S U 5       5      (       a  SUl&        U(       d  UR                  (       d  UR                  (       d  UR                  (       d  UR2                  (       dv  SU RN                  0nURP                  (       a<  [7        SRR                  " S0 [U        USRW                  URP                  5      S9D65      e[7        SRR                  " S0 UD65      eU$ ! [:         a  n[7        UR<                  5      eSnAff = f)zC
Parse command-line arguments into the corresponding requirements.
NTconfig_settings)
comes_fromrW   rX   r   rV   )rX   rW   r   zUsing pylock.toml as a requirements source is an experimental feature. It may be removed/changed in a future release without prior warning.)rU   )rX   )rT   r3   rU   )rW   rX   r      z1--requirements-from-script can only be given oncer   zrequires-python )requires_pythonversion_infozScript z requires a different Python: z not in dependenciesc              3  8   #    U  H  oR                   v   M     g 7frD   )has_hash_options).0reqs     r4   	<genexpr>6RequirementCommand.get_requirements.<locals>.<genexpr>  s     <|##|s   namezXYou must give at least one requirement to {name} (maybe you meant "pip {name} {links}"?) )linkszHYou must give at least one requirement to {name} (see "pip help {name}")rP   ),r5   r`   constraintsextendstripr   rY   r   rZ   rh   r"   r   	editablesr   r\   r'   r   r   r(   r   format_controlr#   r   r3   r1   requirements_from_scriptslenr   r!   r    msgr   r   r&   r   r   
py_versionanyr   r   
find_linksformatdictjoin)rG   rH   r3   rT   rU   r\   r   r   r_   r]   packagepackage_distr^   scriptscript_metadataexcscript_requires_pythontarget_pythonoptss                      r4   get_requirements#RequirementCommand.get_requirements"  s    240990##VgK ,C99;;. .." '1BD IJ 
+  $$.w/H/HI8$22"&

 ##J/ J $$C2" .. '1BD I	J 
+ %  ,,H'11- .L.)G !''7#($#22*.. 0
 A$22"& &-- #**../@A!	
 ##J/+ -H ,,74459"#VWW66q9F,"1&"9 &5%8%89JB%O"%g.L.L 27 ;,$:!.!>!> 3!&+I(334H=S<VX 
 '**>2>8$22"&

 ##J/ ? <|<<<%)G"   ##((00DII&D!!">>DfE t388G4F4F+GH  #..4f5 =7;= 
 e # ,"377++,s   O 
O>$O99O>c                v    U R                   nUR                  5       nU(       a  [        R                  U5        gg)z5
Trace basic information about the provided objects.
N)search_scopeget_formatted_locationsr   info)rT   r   	locationss      r4   trace_basic_info#RequirementCommand.trace_basic_info  s1     ** 88:	KK	" r6   c                    [         R                  " X!S9n[        SUR                  UR                  UR
                  US9n[        R                  " UUUUR                  S9$ )z
Create a package finder appropriate to this requirement command.

:param ignore_requires_python: Whether to ignore incompatible
    "Requires-Python" values in links. Defaults to False.
r2   T)allow_yankedr   release_controlprefer_binaryr   )link_collectorselection_prefsr   uploaded_prior_to)r   creater   r   r   r   r   r   )rG   r3   rU   r   r   r   r   s          r4   _build_package_finder(RequirementCommand._build_package_finder  sf     '--gG."11#33!//#9
 ##)+'%77	
 	
r6   rP   )rH   r   ri   r   rL   rM   )r3   r   rL   str)Nr   )r   r)   r3   r   rt   r   rU   r   rT   r   r   boolrz   z
str | Noneru   rO   rL   r   )NFTFFzto-satisfy-onlyN)r   r   rT   r   r3   r   rv   zWheelCache | Noner   r   r   r   r   r   r   r   r   r   r   ztuple[int, ...] | NonerL   r%   )
rH   rN   r3   r   rT   r   rU   r   rL   list[InstallRequirement])rT   r   rL   rM   r<   )
r3   r   rU   r   r   zTargetPython | Noner   r   rL   r   )__name__
__module____qualname____firstlineno__re   staticmethodrp   classmethodr   r   r   r   r   __static_attributes____classcell__)rj   s   @r4   r8   r8      s   8    $(N
%N
 N
 $	N

 N
 N
 N
 !N
 N
 
N
 N
`  *.#!%', % 1266
%6
 6
 	6

 '6
 6
 6
 !%6
 6
 6
 06
 
6
 6
pNN N 	N
 N 
"N` # # .2',

 
 +	

 !%
 

 
r6   )r3   r   rL   r   )rI   -Callable[[_CommandT, Values, list[str]], int]rL   r   )
r[   rN   rT   r   r3   r   rU   r   rL   r   )R__doc__
__future__r   loggingr/   	functoolsr   optparser   typingr   r   r   pip._internal.build_envr	   r
   r   pip._internal.cacher   pip._internal.clir   pip._internal.cli.cmdoptionsr   pip._internal.cli.index_commandr   r   pip._internal.exceptionsr   r   r   pip._internal.index.collectorr   "pip._internal.index.package_finderr   $pip._internal.models.selection_prefsr   "pip._internal.models.target_pythonr   pip._internal.network.sessionr   ,pip._internal.operations.build.build_trackerr    pip._internal.operations.preparer   pip._internal.req.constructorsr   r   r   r   r   pip._internal.req.pep723r    r!   &pip._internal.req.req_dependency_groupr"   pip._internal.req.req_filer#   pip._internal.req.req_installr$   pip._internal.resolution.baser%   pip._internal.utils.packagingr&   pip._internal.utils.pylockr'   r(   pip._internal.utils.temp_dirr)   r*   r+   	getLoggerr   r   r5   	BUILD_ENVEPHEM_WHEEL_CACHE	REQ_BUILDr=   r7   rQ   r`   r8   rP   r6   r4   <module>r	     s.   #  	   ) ) 
 + ( ; = V 
 8 < E ; 4 E @  F J 9 < 6 ?  
		8	$E ##  K';<	
728  	
 2O
* O
r6   