+
    kz=j҇                       ^ RI Ht ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RI	H
t
 ^ RIHt ^ RIHt ^ RIHt ^ RIt^ RIHtHt ^ R	IHt ^ R
IHt ^ RIHt ^ RIHt ^ RIHt ^ RIH t  ^ RI!H"t" ^ RI#H$t$ ^ RIH%t& ^ RI'H(t) ^RI*H%t% ^RI+H,t, ^RI-H.t. ^RI/H0t0H1t1 ^RI2H3t3H4t4H5t5H6t6H7t7H8t8 ]'       d5   ^ RI9H:t:H;t; ^ RIH<t< ^ RI=H>t> ^ RI?H@t@ ^ RIHAtAHBtB ^ RICHDtD ^ RIEHFtF ^ RIGHHtH ]P                  ! R]J 24      tK ! R  R!]4      tLR# )"    )annotationsN)defaultdict)cache)stack)chain)TYPE_CHECKING)REPODATA_FNChannelPriority)context)NULL)time_recorder)Solver)PackagesNotFoundError)Channel	MatchSpec)get_spinner)__version__)SolverError)RattlerUnsatisfiableError)RattlerIndexHelper)SolverInputStateSolverOutputState)&conda_match_spec_to_rattler_match_spec,conda_prefix_record_to_rattler_prefix_record!fix_version_field_for_conda_buildmaybe_ignore_current_repodatanotify_conda_outdatedrattler_record_to_conda_record)IterableMapping)Literal)
IndexedSet)_Null)DepsModifierUpdateModifier)PathType)BuildRepodataSubset)PackageRecordzconda.c                  j  a  ] tR t^9t^
tRt]]R R l4       4       tR+R+R+]	]
R3R V 3R lllt]
]
]
]
]
R3R R lltR,R	 R
 lltR R ltR-R R llt]! ] R7      R R l4       tR R ltR R ltR.R R lltR R ltR R ltR R ltR R ltR-R  R! lltR" tR# R$ ltR% R& ltR' R( ltR) tR*tV ;t # )/RattlerSolverFc                   V ^8  d   QhRR/#    returnstr )formats   ";lib/python3.14/site-packages/conda_rattler_solver/solver.py__annotate__RattlerSolver.__annotate__?   s     R R R    c                 "    R\          R\         2# )zL
Expose this identifier to allow conda to extend its user agent if required
zconda-rattler-solver/z py-rattler/)r   rattler_versionr1   r6   r3   
user_agentRattlerSolver.user_agent=   s     '{m<?PQQr6   Nc               8    V ^8  d   QhRRRRRRRRR	RR
RRRRR/# )r.   prefixr'   channelsIterable[Channel | str]subdirsIterable[str]specs_to_addzIterable[MatchSpec | str]specs_to_removerepodata_fnr0   commandzstr | _Nullbuild_repodata_subsetzBuildRepodataSubset | Noner1   )r2   s   "r3   r4   r5   E   sd     'M 'M'M *'M 	'M
 0'M 3'M 'M 'M  :'Mr6   c	           
     	  < V'       d   V'       d   \        R 4      hV'       d   V\        J d   Rp\        R V 4       4      V n        Wn        \
        S	V `  \        P                  ! V4      VVVVVVR7       V P                  \        J g   V P                  '       g   \        P                  V n	        RV P                  9  d   . V P                  ORN5V n	        \        V P                  4      V n        R# )zEOnly one of `specs_to_add` and `specs_to_remove` can be set at a timeremovec              3  8   "   T F  p\        V4      x  K  	  R # 5iNr   ).0specs   & r3   	<genexpr>)RattlerSolver.__init__.<locals>.<genexpr>W   s     /YLD	$Ls   )r?   rA   rB   rC   rD   noarchN)
ValueErrorr   	frozenset_unmerged_specs_to_add_build_repodata_subsetsuper__init__osfspathr?   r   r   _repodata_fn)
selfr<   r=   r?   rA   rB   rC   rD   rE   	__class__s
   &&&&&&&&&r3   rT   RattlerSolver.__init__E   s     OW  w$G&//YL/Y&Y#&;#IIf%+# 	 	
 <<4t|||"??DL4<<' 5T\\484DL9$:K:KLr6   c               4    V ^8  d   QhRRRRRRRRRRR	R
RR/# )r.   update_modifierzUpdateModifier | _Nulldeps_modifierzDepsModifier | _Nullprunezbool | _Nullignore_pinnedforce_removeshould_retry_solveboolr/   zIndexedSet[PackageRecord]r1   )r2   s   "r3   r4   r5   n   sP     3 3/3 ,3 	3
 $3 #3 !3 
#3r6   c                	J   \        V P                  V P                  ;'       g    V P                  VVVVVV P                  R 7      p\        VR7      pVP                  4       ;p	e   V	# V P                  V4      p
V P                  \        V
4      R7      p\        V P                  W4      4      ;_uu_ 4        V P                  V
VV P                  VR7      pVP                  V4       RRR4       \        V P                  4       4      ;_uu_ 4        V P!                  WxX4      p\#        VP$                  P'                  4       4      V n        VP*                  pRRR4       V P-                  RV P                  XX4       V#   + '       g   i     L; i  + '       g   i     LC; i))r<   	requestedr\   r]   r^   r_   r`   rD   )solver_input_stateN)seen)r=   conda_build_channelsr?   in_state)r   r<   rA   rB   _commandr   
early_exit_collect_channel_list*_collect_channels_subdirs_from_conda_buildsetr   %_collect_all_metadata_spinner_message_collect_all_metadatar?   check_for_pin_conflicts_solving_loop_spinner_message_solving_looptupleneuteredvaluesneutered_specscurrent_solution_notify_conda_outdated)rX   r\   r]   r^   r_   r`   ra   rh   	out_statemaybe_final_stater=   rg   indexsolutions   &&&&&&&       r3   solve_final_stateRattlerSolver.solve_final_staten   sv    $;;''??4+?+?+''%MM	
 &B	 "+!5!5!77D$$--h7#NNTWX`TaNb66xV
 
 ..!%9!	 / E --e4
 ;;=>> **8FI"'	(:(:(A(A(C"DD 11H ? 	##D$++uhG-
 
 ?>s   61E?AF?F	F"	c               $    V ^8  d   QhRRRRRR/# )r.   r=   Iterable[Channel]rg   r>   r/   r0   r1   )r2   s   "r3   r4   r5      s(     
 
#
 6
 
	
r6   c           
     	   V P                  4       '       dj   R pV'       d^   \        \        P                  V Uu. uF  p\	        V4      P
                  NK  	  up4      4      pVRRP                  V4       R2,          pV# \        \        P                  V Uu. uF  qDP
                  NK  	  up4      4      p\        V4      ^8  d   RP                  V4      pRV R2pMRRP                  V4      ;'       g    R	 R2pT R
\        P                   R\        P                  '       d   RMV P                   RV P                   R2# u upi u upi )zReloading output folderz (z, )z
 - zChannels:
 - 
z	Channel:  zN/Az
Platform: z
Target prefix: z	<dry run>z
Collecting package metadata ()_called_from_conda_buildlistdictfromkeysr   canonical_namejoinlenr   subdirdry_runr<   rW   )	rX   r=   rg   msgcnamescanonical_namescanonical_names_dashedchannels_lines	   &&&      r3   rn   3RattlerSolver._collect_all_metadata_spinner_message   s8   
 ((**+C#MMFZ"[FZ71:#<#<FZ"[\ DIIe,-Q//Jt}}-Q1.>.>-QRS!#%,\\/%B",-C,DBGM'(@(I(IE'J"MMo( )-4___k$++N O,,0,=,=+>aA	
 #\
 .Rs   EEc                    V ^8  d   QhRRRR/# )r.   rh   r   r/   list[Channel]r1   )r2   s   "r3   r4   r5      s     & &.> &= &r6   c                	   / p\        V P                  VP                  4       VP                  4       4       F  p\	        VR R4      ;p'       dw   W@P
                  9  d#   \        P                  RVVV P
                  4       \        R/ VP                  4       P                  4        UUu/ uF  w  rVVR 8w  g   K  WVbK  	  uppB pRW#&   K  	  \        V4      # u uppi )platformNz^Channel %s defines platform %s which is not part of subdirs=%s. Ignoring platform attribute...r1   )r   r=   channels_from_specsmaybe_free_channelgetattrr?   loginfor   dumpitemsr   )rX   rh   deduped_channelschannelchannel_platformkvs   &&     r3   rk   #RattlerSolver._collect_channel_list   s    MM87798;V;V;X
G $+7J#EEE#<<7HH9( "aglln6J6J6L$`6LdaPQU_P_TQT6L$`a(,%
  $%% %as   (C8Cc                    V ^8  d   QhRRRR/# )r.   rf   zset[Channel] | Noner/   r   r1   )r2   s   "r3   r4   r5      s      ! 
r6   c                	   V P                  4       '       d   T;'       g    \        4       p/ pV P                  ;'       g    /  F  pVP                  P                  R 8X  g   K   \        R/ VP                  P                  4       P                  4        UUu/ uF  w  rEVR8w  g   K  WEbK  	  uppB pWa9  g   Kv  VP                  V4       K  	  \        V4      # . # u uppi )filer   r1   )
r   rm   _indexr   schemer   r   r   
setdefaultr   )rX   rf   rg   recordr   r   r   s   &&     r3   rl   8RattlerSolver._collect_channels_subdirs_from_conda_build   s     ((**==35D $& +++++>>((F2 & ,2NN,?,?,A,G,G,I],IDAQR\_414,I]G *,77@ , ,--	 ^s   C%C)module_namec          
     ,    V ^8  d   QhRRRRRRRRRR	/# )
r.   r=   r   rg   r?   r@   rh   r   r/   r   r1   )r2   s   "r3   r4   r5      s<      # 0 	
 # 
r6   c           	     	    \        . VOVOTV P                  \        P                  '       d   \        P                  MRVV P
                  R 7      pV F  pVP                  V4       K  	  V# ))r=   r?   rC   	pkgs_dirsrh   rE   r1   )r   rW   r   offliner   rR   reload_channel)rX   r=   rg   r?   rh   r{   r   s   &&&&&  r3   ro   #RattlerSolver._collect_all_metadata   sf     #7+7h7))+2???g''"&"="=
 ,G  ) ,r6   c                   V ^8  d   QhRR/# r-   r1   )r2   s   "r3   r4   r5     s     
% 
%s 
%r6   c                    \         P                  P                  V P                  4      pV P	                  4       '       d7   RV9   d.   RP                  VP                  R4      R,          4      pRV R2# R# R# )z<This shouldn't be our responsibility, but the CLI / app's..._env_:N   NzSolving environment (r   zGetting pinned dependencieszSolving environment)rU   pathbasenamer<   r   r   split)rX   prefix_nameenv_names   &  r3   rq   +RattlerSolver._solving_loop_spinner_message  sf    gg&&t{{3((**$88K$5$5c$:2$>?.xj:: 5$r6   c               (    V ^8  d   QhRRRRRRRR/# )r.   rh   r   ry   r   r{   r   r/   r1   )r2   s   "r3   r4   r5     s2     3 3"3 %3 "	3
 
3r6   c                	   R pVP                  V4       \        VP                  4      ;p'       d   \        WPP                  4      pM^p\        ^V^,           4       F  p\        P                  RV4       V P                  WW7R7      p\        V\        4      '       g    EM1\        V\        VP                  4      \        VP                  4      \        VP                  4      \        VP                   4      \        VP"                  4      R7      pK  	  VP                   P%                  VP                  P'                  4        UU	u/ uF)  w  rV	P(                  '       d   K  WP+                  4       bK+  	  up	p4       V P                  VVVXR,           R7      p\        V\        4      '       g   Vf   \-        T;'       g    R4      p
RV
n        V
hV P1                  WB4       VP3                  V R7       V# u up	pi )NzStarting solver attempt %s)attempt)re   recordsfor_historyrt   	conflictspinsi  zCould not find solutionF)solver)rp   r   	installedminMAX_SOLVER_ATTEMPTS_CAPranger   debug_solve_attempt
isinstance	Exceptionr   r   r   r   rt   r   r   updater   is_unmanageableto_match_specr   allow_retry_export_solved_records
post_solve)rX   rh   ry   r{   r|   n_installedmax_attemptsr   namer   excs   &&&&       r3   rr   RattlerSolver._solving_loop  s    ))%0h0011;1{,H,HILLQq 01GII2G<**8*WHh	22)#+Y../ !6!67i001y223)..)I 2 && )1(:(:(@(@(B(B!11 1D..00(B **$	 + H (I..(2B/0U0U<UV"'	 	##H8 	D)/s   G7
"G7
c          
     ,    V ^8  d   QhRRRRRRRRR	R
/# )r.   rh   r   ry   r   r{   r   r   intr/   z1RattlerSolverError | list[rattler.RepoDataRecord]r1   )r2   s   "r3   r4   r5   B  s<     2 2"2 %2 "	2
 2 
;2r6   c                   / V P                  W4      CRVP                  P                  4        Uu. uF  qUP                  NK  	  upRV P	                  V4      R\
        P                  \        P                  8X  d   \        P                  P                  M\        P                  P                  RRR\
        P                  '       d   \        P                  P                  M\        P                  P                  /Cp\         P#                  \$        P&                  4      '       d5   \(        P*                  ! V^\,        RR7      p\         P/                  R	WG4        \0        P2                  ! \        P4                  ! R/ VB 4      pVP6                  P9                  4        V# u upi   \:         d(   p	T P=                  \-        T	4      Y4       T	u R
p	?	# R
p	?	ii ; i)a  
The solver in rattler is declarative: you pass the things you want
and it returns either a solution or an exception with the conflicts.
There's no concept of 'remove'. Thus, we need to structure the requests
a bit differently than in classic or libmamba.

The solver API offers these categories:

- specs: MatchSpecs to _install_.
- constraints: Additional conditions (as MatchSpecs) to meet,
  _if_ the package mentioned ends up in the install list.
- locked_packages: Preferred records (useful to minimize number of updates and respect
  the installed packages, history or lockfiles).
- pinned_packages: Records that MUST be present if needed. It will not allow any other
  variant.
- virtual_packages: Details of the system.
sparse_repodatavirtual_packageschannel_prioritystrategyhighestpackage_format_selectionT)indentdefault	sort_keyszSolver input for attempt %s:
%sNr1   )_collect_specsr   ru   repo_rattler_virtual_packagesr   r   r
   STRICTrattlerStrictDisableduse_only_tar_bz2PackageFormatSelectionONLY_TAR_BZ2PREFER_CONDA_WITH_WHLr   isEnabledForloggingDEBUGjsondumpsr0   r   asynciorunsolve_with_sparse_repodatar   clearRattlerSolverError_maybe_raise_for_problems)
rX   rh   ry   r{   r   r   solve_kwargsdumpedr|   r   s
   &&&&&     r3   r   RattlerSolver._solve_attemptB  sf   0
!!(6
ell6I6I6KL6Kd		6KL > >x H++/E/EE ''..,,55	&+++ ..;;33II
  GMM**ZZQtTFII8'J	{{7#E#E#U#UVH
 %%'O1  M& " 	**3s8XIJ	s#   F!*F& &G1GGGc               $    V ^8  d   QhRRRRRR/# r.   rh   r   ry   r   r/   @dict[str, list[rattler.MatchSpec] | list[rattler.PackageRecord]]r1   )r2   s   "r3   r4   r5   v  s.     A A"A %A 
J	Ar6   c                    VP                   '       d   V P                  W4      # V P                  4       '       d   V P                  V4      # V P	                  W4      # )a  
The solve functions in rattler expect four types of input:

- specs: The explicitly requested match specs to install
- constraints: Additional constraints to be considered by the solver. They won't be
    necessarily installed, but if present, they have to comply with the constraint.
- locked_packages: Prefer these records over alternatives. Useful to
    favour already installed packages instead of mindlessly upgrading. That said,
    if necessary for the solution, they will be changed.
- pinned_packages: Like locked packages, but stronger. These are considered frozen!

Note: This is confusing with the nomenclature followed in libmamba, where pinning and
locking were swapped in meaning. Additionally, conda classic pins are actually better
expressed as constraints in rattler.
)is_removing_collect_specs_for_remover   _collect_specs_for_conda_build_collect_specs_main)rX   rh   ry   s   &&&r3   r   RattlerSolver._collect_specsv  sR    ( 11(FF**,,66x@@++H@@r6   c               $    V ^8  d   QhRRRRRR/# r  r1   )r2   s   "r3   r4   r5     s.     U
 U
"U
 %U
 
J	U
r6   c                	   . p. p. p. p0 VP                   mVP                  mVP                  mpRpVP                  P	                  R4      p	VP
                  P	                  R4      p
V	'       d   V
'       d   V
P                  V	4      '       * p\        \        4      pV P                   F$  pWP                  ,          P                  V4       K&  	  VP
                   EF  pRV9   d   K  VP                  P	                  V4      pVP	                  V4      pVP                  P	                  V4      pVP                  P	                  V4      pVP                  P	                  V4      pRpV'       dH   V'       d@   VP                  f2   VP                   F!  p\!        V4      P                  R9   g   K  Rp M	  V'       d>   VP"                  '       g+   V'       d   VP                  V4       VP                  V4       M]VR8X  dW   V'       dO   V'       gG   RP%                  VP&                  P)                  R4      R,          4      pVP                  RV R	24       V'       d   VP+                  V4       EK  WP,                  9   dD   VP.                  P0                  '       d   V'       d   V'       g   EK  VP                  V4       EK  VP2                  '       d   EK  V'       d   V'       d   VP4                  ^8X  d   \7        VP&                  ;'       g    R
4      pVP9                  R4      '       d   V RVR,           2pM2VP9                  R4      '       d	   V RV 2pMV'       d
   V RV R	2pMTpVP                  V4       EK  VP                  V4       VP                  V4       EK  V'       g   EK  V'       * pV'       d   VP"                  '       d   RpRpM=V'       d   RpM2W9   d   RpM)VP.                  P:                  '       d   V'       g   RpMRpV'       d   VP                  VP                  4       VR8X  d   VP                  V4       EK~  VR8X  g   EK  VP                  V4       EK  	  RV Uu. uF  p\=        V4      NK  	  upRV Uu. uF  p\=        V4      NK  	  upRV Uu. uF  p\?        V4      NK  	  upRV Uu. uF  p\?        V4      NK  	  up/# u upi u upi u upi u upi )Q
See docstring for ._collect_specs() for more details about rattler.solve() API.
Fpython*NT.:Nr.   Nzpython z.*r   z== :r.   NNfreezelockspecsconstraintslocked_packagespinned_packages)r  
python_abi)z!=><) aggressive_updatespinneddo_not_remover   getr  matchr   r   rQ   r   appendhistoryr   rN   dependsr   is_name_only_specr   versionr   extendalways_updater\   
UPDATE_ALLr^   
strictnessr0   
startswithFREEZE_INSTALLEDr   r   )rX   rh   ry   r  r  r  r  	protectedpython_version_might_changeinstalled_pythonto_be_installed_pythonrequested_specsrK   r   r   rd   r  r  conflictingdepends_on_changing_pythondeppyverr"  spec_strkeepactionr   s   &&&                        r3   r  !RattlerSolver._collect_specs_main  s<    *,/17979
((
 __
 ##	
	 ',##--11(;!*!4!4X!> 6.D.J.JK[.\*\'
 &d+//DII&--d3 0 OODd{'/'9'9'='=d'CI)8)<)<T)BI!)!1!1!5!5d!;G ( 3 3D 9F%.%8%8%<%<T%BK).&*yY=M=M=U$,,C ~**.FF592 - /// T*  &&v.!i	!2!2!8!8!=b!AB""WUG2#67 Y'///++666;w LL&  7#5#5#: "'//"7"7R8G))$//&*V1WR[M#: ++,<==&*V1WI#6 &*V1WIR#8#'LL*LL)#**95  "-_ f666%FD/!F&#F-->>>{%F#FLL0X%#**95v%#**95K $P uUut<TBuUU`aU`TB4HU`aSb Sb<VDSb  Sb Sb<VDSb 	
 		
Ua  s   ?S(S-
5S2S7c               $    V ^8  d   QhRRRRRR/# r  r1   )r2   s   "r3   r4   r5   (  s.     @
 @
"@
 %@
 
J	@
r6   c                   . p. p. p. p\        4       pVP                  P                  4        Fl  w  rRV9   dP   VP                  P                  4        F/  w  rV	P	                  V4      '       g   K  VP                  V
4       K1  	  K[  VP                  V4       Kn  	  VP                   EF=  pRV9   d   K  VP                  P                  V4      pVP                  P                  V4      pVP                  P                  V4      pVP                  P                  V4      pW9   d   VP                  V R24       K  V'       d>   VP                  '       d   V'       d   VP                  V4       MVP                  V4       V'       g   K  WP                  9   d   VP                  V4       EK  V'       d   EK  V'       d   VP                  V4       VP                  V4       EK@  	  RV Uu. uF  p\        V4      NK  	  upRV Uu. uF  p\        V4      NK  	  upRV Uu. uF  p\        V4      NK  	  upRV Uu. uF  p\        V4      NK  	  up/# u upi u upi u upi u upi )a  
See docstring for ._collect_specs() for general details.

The solve functions in rattler don't have a notion of 'removing' packages. They
always assume you are expressing everything you want in the environment. With
that mindset, 'removing' a package just means stop asking for it. This mostly
translates into an impossible constraint (`package<0.0.0.dev0`) so that
package is excluded. The unfreeze-if-conflicting loop takes care of the rest.
r  z
<0.0.0dev0r  r  r  r  )rm   rd   r   r   r  addr  r  r  r  r   r  r!  r  r   r   )rX   rh   ry   r  r  r  r  rG   requested_namerequested_specinstalled_nameinstalled_recordr   r   r  r  r.  rK   r   s   &&&                r3   r  'RattlerSolver._collect_specs_for_remove(  s    *,/17979 .6.@.@.F.F.H*Nn$8@8J8J8P8P8R4N%++,<==

>2 9S 

>* /I OODd{'/'9'9'='=d'CI!)!1!1!5!5d!;G ( 3 3D 9F%.%8%8%<%<T%BK~""dV:#67+++	#**95&&v.y666LL&$W-#**951 $6 uUut<TBuUU`aU`TB4HU`aSb Sb<VDSb  Sb Sb<VDSb 	
 		
Ua  s   0II
&I#I(c               $    V ^8  d   QhRRRRRR/# )r.   problemsr0   rh   r   ry   r   r1   )r2   s   "r3   r4   r5   n  s)     O2 O2O2'7O2DUO2r6   c                	  a / p/ pVP                  4        EF[  pR  F  pVP                  VR4      pK  	  VP                  4       pVP                  R4      '       d   VP	                  R^4      ^,          pVP	                  4       pRV9   d*   \        V^ ,           RV^,           24      WH^ ,          &   K  RV9   d9   \        V^ ,           RV^,          P                  R4       24      WH^ ,          &   K  RV9   d+   \        V^ ,           RV^,           24      WH^ ,          &   EK  R	V9   d1   R
V9   d*   \        RP                  V^R 4      4      WH^,          &   EKF  RV9   d3   RV9  d,   VP                  R4      p	\        VRV	 4      WH^ ,          &   EK  RV9   g   EK  VP                  R4      p	V	\        R4      ,          p	WiR P                  R4      o\        S4      o\        ;QJ d7    V3R lVP                  P                  4        4       F  '       g   K   RM,	  RM(! V3R lVP                  P                  4        4       4      '       d   SVSP                  &   EKL  SVSP                  &   EK^  	  V P                  / VCVCVR7       V'       gv   V'       dn   \        P!                  R\#        VP%                  4       4      V4       \'        \#        VP                  4       4      \#        V P(                  4      4      p
RV
n        V
hVP,                  ;'       g    / p\/        VP                  4       4      p\/        VP                  4       4      pVP1                  V4      p\        V4      ^8  d   RV9   d   VP3                  R4       V'       d   W8X  g   \        V4      ^
8  d   \5        V4      p
RV
n        V
h\        P!                  R\        V4      VV4       VP,                  P7                  V4       R# )u   ─│└├r   z$Cannot solve the request because of::z<is locked, but another version is required as reported abover  z=which cannot be installed because there are no viable options,z7cannot be installed because there are no viable optionszthe constraintzcannot be fulfilledz2can be installed with any of the following optionswhichz can be installed withNzNo candidates were found forzNo candidates were found for r  c              3  F   <"   T F  pSP                  V4      x  K  	  R # 5irI   )r  )rJ   r   rK   s   & r3   rL   :RattlerSolver._maybe_raise_for_problems.<locals>.<genexpr>  s     T8Sftzz&))8Ss   !TF)messagez4Inferred PackagesNotFoundError %s from conflicts:
%sr  z2Attempt failed with %s conflicts: %s. Problems:
%s)
splitlinesreplacestripr'  r   r   r   r{   r   rstripanyr   ru   r   _maybe_raise_for_conda_buildr   r   rs   keysr   r=   r   r   rm   
differencepopr   r   )rX   r?  rh   ry   unsatisfiable	not_foundlinecharwordspositionr   previousprevious_setcurrent_setdiffrK   s   &&&&           @r3   r   'RattlerSolver._maybe_raise_for_problemsn  sS    	'')D&||D"- '::<DEFFzz#q)!,JJLEMQUU*3uQxj%(4L*MAh'PTXX*3uQxj%(..QTBUAV4W*XAh'JdR*3uQxj%(4L*MAh'!T).Ct.K*3CHHU1R[4I*JAh'DL4'::&>?*3D(O*DAh'/47::&EFC ?@@I--c2  3T8J8J8Q8Q8ST333T8J8J8Q8Q8STTT/3M$)),+/Idii(A *F 	))*}*	* 	* 	

 IIGinn&' (i.>.>.@(A5CWXC#COI&&,,"8??,--..01%%l3t9q=X6 h',53t9?+H5C#COI		A		
 	""=1r6   c               $    V ^8  d   QhRRRRRR/# )r.   conflicting_specszMapping[str, MatchSpec]rF  r0   r/   Noner1   )r2   s   "r3   r4   r5     s(      2  
	r6   c                	    V P                  4       '       g   R # V'       g   R # ^RIHp \        R V P                   4       \
        P                  4      pV! \        VP                  4       4      \        VP                  4       4      VVR7      pVh)N)%ExplainedDependencyNeedsBuildingErrorc              3  6   "   T F  qR 8w  g   K  Vx  K  	  R# 5i)rN   Nr1   )rJ   r   s   & r3   rL   =RattlerSolver._maybe_raise_for_conda_build.<locals>.<genexpr>  s     OL&h<NvvLs   
)packages
matchspecsr   explanation)
r   _conda_build_exceptionsr`  nextr?   r   r   r   rN  ru   )rX   r]  rF  r`  r   r   s   &&&   r3   rM  *RattlerSolver._maybe_raise_for_conda_build  sy     ,,.. R ODLLOQXQ_Q_`3+0023-4467	
 	r6   c                	    VP                   P                  4        V F&  p\        V4      pWBP                   VP                  &   K(  	  R # rI   )r   r   r   r   )rX   r   ry   rattler_recordconda_records   &&&  r3   r   $RattlerSolver._export_solved_records  s<    !%N9.IL3?l//0 &r6   c                    V ^8  d   QhRRRR/# )r.   rh   r   r/   z#list[rattler.GenericVirtualPackage]r1   )r2   s   "r3   r4   r5     s     

 

(

	,

r6   c           	     	   VP                   P                  4        Uu. uFa  p\        P                  ! \        P                  ! VP
                  4      \        P                  ! VP                  4      VP                  4      NKc  	  up# u upi rI   )	virtualru   r   GenericVirtualPackagePackageNamer   Versionr"  build)rX   rh   pkgs   && r3   r   'RattlerSolver._rattler_virtual_packages  sp      ''..0
 1 ))##CHH-,		
 1
 	
 
s   A'Bc                   V ^8  d   QhRR/# )r.   r/   rb   r1   )r2   s   "r3   r4   r5     s     
 
$ 
r6   c                    \        V RR4      ;'       dA    R\        P                  9   ;'       d&    RR0\        4        Uu0 uF  q^,          kK  	  up8*  # u upi )a  
conda build calls the solver via `conda.plan.install_actions`, which
overrides Solver._index (populated in the classic solver, but empty for us)
with a custom index. We can use this to detect whether conda build is in use
and apply some compatibility fixes.
r   Nconda_buildinstall_actionsget_install_actions)r   sysmodulesr   )rX   frames   & r3   r   &RattlerSolver._called_from_conda_build  sh     D(D) ^ ^,^ ^ #$9:UZU\>]U\EQxxU\>]]	
 ?^s    Ac                    V ^8  d   QhRRRR/# )r.   rh   r   r/   r  r1   )r2   s   "r3   r4   r5     s     
 
"
 
J
r6   c                "   . pVP                   P                  4        FH  w  r4VP                  R4      '       d   K  \        V4      pVP	                  VP                  4       4       KJ  	  RV Uu. uF  p\        V4      NK  	  upR. R. R. /# u upi )r  __r  r  r  r  )rd   r   r'  r   r  conda_build_formr   )rX   rh   r  r   rK   s   &&   r3   r  ,RattlerSolver._collect_specs_for_conda_build  s     ",,224JDt$$4T:DLL..01	 5 uUut<TBuU2rr	
 	
Us   .Bc                	    \        V/ VB  R # rI   )r   )rX   
link_precsargskwargss   &&*,r3   rx   $RattlerSolver._notify_conda_outdated  s    t.v.r6   )rR   rW   rQ   rv   r?   r1   )r1   rI   )r   )!__name__
__module____qualname____firstlineno__r   	_uses_sscstaticmethodr   r9   r	   r   rT   r}   rn   rk   rl   r   ro   rq   rr   r   r   r  r  r   rM  r   r   r   r  rx   __static_attributes____classcell__)rY   s   @r3   r+   r+   9   s     I
R  R "$2457&#<@'M 'MV 37.2"&*%)#(3n
6&** x( ),
%3j2hA6U
n@
LO2b6@


(
*/ /r6   r+   )M
__future__r   r   r   r   rU   r{  collectionsr   	functoolsr   inspectr   	itertoolsr   typingr   r   conda.base.constantsr	   r
   conda.base.contextr   conda.common.constantsr   conda.common.ior   conda.core.solver   conda.exceptionsr   conda.models.channelr   conda.models.match_specr   conda.reportersr   r   r8   rattler.exceptionsr   r   r   
exceptionsr   r{   r   stater   r   utilsr   r   r   r   r   r   collections.abcr    r!   r"   boltons.setutilsr#   conda.auxlibr$   r%   r&   conda.common.pathr'   conda.gateways.shardsr(   conda.models.recordsr)   	getLoggerr  r   r+   r1   r6   r3   <module>r     s    "    	 
 #       = & ' ) # 2 ( - ' 2 @  1 % 6  1+" +92&
+,`/F `/r6   