
    5>ib@                    H   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/J0r0  SSK1J2r2J3r3  SSK4J5r5  SSK6J7r7  SSK8J9r9  SSK:J;r;  SSK<J=r=  SSK>J?r?J@r@JArA  \R                  " \C5      rDS$S jrE\AR                  \AR                  \AR                  /rI\" SSS 9rJ    S%S! jrK          S&S" jrL " S# S\5      rMg)'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_req_string)PEP723Exceptionpep723_metadata)parse_dependency_groups)parse_requirements)InstallRequirement)BaseResolver)check_requires_python)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    \/var/www/html/land-tabula/venv/lib/python3.13/site-packages/pip/_internal/cli/req_command.py!should_ignore_regular_constraintsr2   ;   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     r1   configure_tempdir_registry0with_cleanup.<locals>.configure_tempdir_registryV   s    'A5) (r3   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   )selfr0   argsr=   funcs      r1   wrapperwith_cleanup.<locals>.wrapperZ   s`    $$000&t'<'<=	t,,$ 	 't'<'<=	s	   > A)r;   r'   returnNone)rC   r4   r0   r   rD   	list[str]rH   int )rE   rF   r=   s   ` @r1   with_cleanuprM   O   s    *  Nr3   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finderr0   sessionFisolateduser_supplied)r"   r   isolated_modeappend)constraint_filesrP   r0   rQ   requirementsfilename
parsed_req
req_to_adds           r1   parse_constraint_filesr\   k   sd     L$,
J = ..#J
 
+
 % r3   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$ )r5      c                   > [         TU ]  " U0 UD6  U R                  R                  [        R
                  " 5       5        U R                  R                  [        R                  " 5       5        g r@   )super__init__cmd_opts
add_optionr   dependency_groupsrB   )rC   rD   kw	__class__s      r1   ra   RequirementCommand.__init__   sK    $%"%  !=!=!?@  !4!4!67r3   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_enabledr/   s    r1   determine_resolver_variant-RequirementCommand.determine_resolver_variant   s      C CCr3   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.
Frj   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)rP   build_trackerro   	verbositywheel_cache)ro    build_constraint_feature_enabled)	build_dirsrc_dirdownload_dirbuild_isolationbuild_isolation_installercheck_build_depsrp   rQ   progress_barrP   require_hashesuse_user_site
lazy_wheelrq   legacy_resolver)pathrl   features_enabledloggerwarninggetattrr\   r
   r   	cache_dirr   r   ru   rw   ry   rz   r{   )clstemp_build_dirr0   rp   rQ   rP   r|   rv   rq   temp_build_dir_pathr~   resolver_variantr}   ro   rs   build_constraint_reqsenv_installers                    r1   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'!+
 	
r3   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.
)rS   rj   r   N)preparerrP   rr   make_install_reqr|   ignore_dependenciesignore_installedignore_requires_pythonforce_reinstallupgrade_strategypy_version_info)r   r   rU   rl   ,pip._internal.resolution.resolvelib.resolver	_internal
resolutionrj   resolverResolverr   (pip._internal.resolution.legacy.resolverri   )r   r   rP   r0   rr   r|   r   r   r   r   r   r   r   pips                 r1   make_resolver RequirementCommand.make_resolver   s    " #'**
 99'B |+?==++66??HH!'!1+$+$?$?!1'= /!1 / I   	8}}''..77@@#-' ' ; ;-#9+-+ A 
 	
r3   c                D   / 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                   Hg  n	[        XX$S9 HV  n
[!        U
UR                  SU
R"                  (       a  U
R"                  R%                  S5      OSS9nUR                  U5        MX     Mi     UR&                  (       a  [)        UR&                  5      S	:  a  [+        S
5      eUR&                  S   n [-        U5      nUR%                  SS5      nU(       aU  UR2                  (       dD  [5        U5      n[7        UUR8                  S9(       d   [;        SU< SUR<                   SU< 35      eUR%                  S/ 5       H)  n[        UUR                  SS9nUR                  U5        M+     [?        S U 5       5      (       a  SUl         U(       d  UR                  (       d  UR                  (       d  UR                  (       d  UR&                  (       dv  SU RB                  0nURD                  (       a<  [+        SRF                  " S0 [I        USRK                  URD                  5      S9D65      e[+        SRF                  " S0 UD65      eU$ ! [.         a  n[+        UR0                  5      eSnAff = f)zC
Parse command-line arguments into the corresponding requirements.
NTconfig_settings)
comes_fromrS   rT   r   rR   )rT   rS   r   )rP   r0   rQ   )rS   rT   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r@   )has_hash_options).0reqs     r1   	<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}")rL   )&r2   r\   constraintsextendstripr   rU   r   rV   rd   r!   r   	editablesr   rX   r"   r   r0   r.   requirements_from_scriptslenr   r    r   msgr   r   r%   r   r   
py_versionanyr{   r   
find_linksformatdictjoin)rC   rD   r0   rP   rQ   rX   r   r   r[   rY   rZ   scriptscript_metadataexcscript_requires_pythontarget_pythonoptss                    r1   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0
 A$22"& &-- #**../@A!	
 ##J/ -  ,,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   "M; ;
NNN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)rP   r   	locationss      r1   trace_basic_info#RequirementCommand.trace_basic_info  s1     ** 88:	KK	" r3   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.
r/   T)allow_yankedformat_controlrelease_controlprefer_binaryr   )link_collectorselection_prefsr   uploaded_prior_to)r   creater   r   r   r   r   r   )rC   r0   rQ   r   r   r   r   s          r1   _build_package_finder(RequirementCommand._build_package_finder  sf     '--gG."11#33!//#9
 ##)+'%77	
 	
r3   rL   )rD   r   re   r   rH   rI   )r0   r   rH   str)Nr   )r   r&   r0   r   rp   r   rQ   r   rP   r   r|   boolrv   z
str | Nonerq   rK   rH   r   )NFTFFzto-satisfy-onlyN)r   r   rP   r   r0   r   rr   zWheelCache | Noner|   r   r   r   r   r   r   r   r   r   r   ztuple[int, ...] | NonerH   r$   )
rD   rJ   r0   r   rP   r   rQ   r   rH   list[InstallRequirement])rP   r   rH   rI   )NN)
r0   r   rQ   r   r   zTargetPython | Noner   zbool | NonerH   r   )__name__
__module____qualname____firstlineno__ra   staticmethodrl   classmethodr   r   r   r   r   __static_attributes____classcell__)rf   s   @r1   r5   r5      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zz z 	z
 z 
"zx # # .2.2

 
 +	

 !,
 

 
r3   )r0   r   rH   r   )rE   -Callable[[_CommandT, Values, list[str]], int]rH   r   )
rW   rJ   rP   r   r0   r   rQ   r   rH   r   )N__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   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.temp_dirr&   r'   r(   	getLoggerr   r   r2   	BUILD_ENVEPHEM_WHEEL_CACHE	REQ_BUILDr9   r4   rM   r\   r5   rL   r3   r1   <module>r     s)   #  	   ) ) 
 + ( ; = V 
 8 < E ; 4 E @  F J 9 < 6 ?  
		8	$E ##  K';<	
728  	
 2{
* {
r3   