+
    :1j[+                        R t ^ RIHt ^ RIHt ^ RIHt ^ RIHtHt ^ RI	H
t
 ^RIHt ]
'       d   ^ RIHtHtHt ^RIHt R	 R
 ltR R ltR R lt]3R R lltR# )zhCLI implementation for `conda search`.

Query channels for packages matching the provided package spec.
)annotations)SUPPRESS)defaultdict)datetimetimezone)TYPE_CHECKING)_ValidatePackages)ArgumentParser	Namespace_SubParsersActionPackageRecordc                    V ^8  d   QhRRRR/# )   sub_parsersr   returnr	    )formats   "5lib/python3.14/site-packages/conda/cli/main_search.py__annotate__r      s     S S"3 S. S    c           	        ^RI Hp ^RIHp ^RIHpHpHpHp RpV! RV R24      p	V! R4      p
V P                  ! R(RVR	V	R
V
/VB pVP                  RRRR7       VP                  RRRRR7       VP                  RRRRRVR7       VP                  RRRR7       VP                  RRR\        \        R7       VP                  RR\        R7       VP                  RR R\        R7       VP                  R!R\        R7       V! V4       VP                  R"R#R\        R7       VP                  R$R\        R7       VP                  R%R\        R7       V! V4       V! V4       V! V4       VP                  R&R'7       V# ))r   )dals)NULL)add_parser_channelsadd_parser_jsonadd_parser_knownadd_parser_networkingzRSearch for packages and display associated information using the MatchSpec format.z	
        zD

        MatchSpec is a query language for conda packages.
        ae  
        Examples:

        Search for a specific package named 'scikit-learn'::

            conda search scikit-learn

        Search for packages containing 'scikit' in the package name::

            conda search *scikit*

        Note that your shell may expand '*' before handing the command over to conda.
        Therefore, it is sometimes necessary to use single or double quotes around the query::

            conda search '*scikit'
            conda search "*scikit*"

        Search for packages for 64-bit Linux (by default, packages for your current
        platform are shown)::

            conda search numpy[subdir=linux-64]

        Search for a specific version of a package::

            conda search 'numpy>=1.12'

        Search for a package on a specific channel::

            conda search conda-forge::numpy

        Search for a package on a specific channel and platform::

            conda search 'numpy[channel=conda-forge, subdir=osx-64]'

        Search for a package with a specific software version and python version::

            conda search 'numpy-base=2.4.2=py313*'
            conda search 'numpy-base[version="2.4.2",build=py313*]'

        Search for a package with a specific software version and build string::

            conda search 'r-shiny=1.12.0=r45*'
            conda search 'r-shiny[version="1.12.0",build=r45*]'

        helpdescriptionepilogz--envs
store_truezSearch all of the current user's environments. If run as Administrator (on Windows) or UID 0 (on unix), search all known environments on the system.)actionr   z-iz--infoz0Provide detailed information about each package.z--subdirz
--platformstoresubdirzSearch the given subdir. Should be formatted like 'osx-64', 'linux-32', 'win-64', and so on. The default is to search the current platform.)r"   destr   defaultz--skip-flexible-searchz7Do not perform flexible search if initial search fails.
match_spec*?)r&   nargsr"   r   z--canonicalz-fz--full-namez--names-onlyz-oz
--outdatedz--specz--reverse-dependencyzconda.cli.main_search.execute)func)search)
auxlib.ishr   common.constantsr   helpersr   r   r   r   
add_parseradd_argumentr   r   set_defaults)r   kwargsr   r   r   r   r   r   summaryr   r    ps   &,          r   configure_parserr6      s   !'  cG			 		K ,	.F` 	 		  	 		
 	A NNX   NN?	   NNN   NN F  
 NN    NN  
 NN	   NN  
 QNN	   NN  
 NN    !ANN7N8Hr   c               $    V ^8  d   QhRRRRRR/# )r   argsr
   parserr	   r   intr   )r   s   "r   r   r      s&     G G) G^ G Gr   c                  aa ^RI Hp ^RIHp ^RIHp ^RIHp ^RIH	p ^RI
Ho ^RIHo ^RIHp V! V P                   4      pVP#                  R	4      '       d   VP#                  R	4      3p	MVP$                  p	V P&                  '       Edv   V! R
V 24      ;_uu_ 4        V! V4      p
\(        ;QJ d    . V3R lV
 4       F  NK  	  5M! V3R lV
 4       4      pV'       g   ^RIHp V! V.4      h RRR4       VP.                  '       d   V! X4       ^ # V P0                  '       d'   X F  pVR,           F  p\3        V4       K  	  K   	  ^ # RR:R RR:R RR:R RR:R RR:R 2
.pX Fu  pVR,           Fe  pVP5                  VP6                  :R RVP8                  :R RVP:                  :R RVP<                  P6                  :R RVR,          :R 2	4       Kg  	  Kw  	  \?        RPA                  V4      4       ^ # V! R4      ;_uu_ 4        VP#                  R4      pV'       d   V3MVPB                  p\E        VPG                  VVV	4      V3R lR 7      pRRR4       X'       g   V PH                  '       gu   VP#                  R!4      '       d^   V! VR"VP6                   R"2R#7      pVP.                  '       g   \?        R$V R%V 24       \E        VPG                  VXV	4      V3R& lR 7      pV'       g(   ^R'IH%p ^R(I&H'p V! V.V! VPB                  V	4      4      hVP.                  '       dE   \Q        \R        4      pV F%  pVVP6                  ,          P5                  V4       K'  	  V! V4       ^ # V P0                  '       d   V F  p\3        V4       K  	  ^ # RR:R) RR:R RR:R RR:R 2.pV FY  pVP5                  VP6                  :R RVP8                  :R RVP:                  :R RVP<                  P6                  :R 24       K[  	  \?        RPA                  V4      4       ^ #   + '       g   i     ELH; i  + '       g   i     EL; i)*z
Implements `conda search` commands.

`conda search <spec>` searches channels for packages.
`conda search <spec> --envs` searches environments for packages.

)context)stdout_json)query_all_prefixes)
SubdirData)	MatchSpecr   )VersionOrder)get_spinnerr$   zSearching environments for c              3  r   <"   T F,  w  rR VR\        \        V3R lV 4       R R7      4      /x  K.  	  R# 5i)locationpackage_recordsc              3  H   <"   T F  pSP                   ! V4      x  K  	  R # 5iN)from_objects).0
prefix_recr   s   & r   	<genexpr>$execute.<locals>.<genexpr>.<genexpr>   s&      2=J !. : :: F F2=s   "c                    V P                   # rG   )_pkey)precs   &r   <lambda>#execute.<locals>.<genexpr>.<lambda>   s    TZZr   keyN)tuplesorted)rI   prefixprefix_recsr   s   &  r   rK   execute.<locals>.<genexpr>   sJ      # ,:'F %u2= !8( ,:s   47)PackagesNotFoundErrorNrE   z# Name13 Versionz>15Buildz  Channel20Location15rD   
zLoading channelschannelc                V   < V P                   S! V P                  4      V P                  3# rG   nameversionbuildrecrA   s   &r   rP   execute.<locals>.<lambda>      SXX|CKK'@#))Lr   rR   rg   r(   )rg   zNo match found for: z
. Search: c                V   < V P                   S! V P                  4      V P                  3# rG   rf   rj   s   &r   rP   rl   
  rm   r   )PackagesNotFoundInChannelsError)all_channel_urls18)*base.contextr<   
cli.commonr=   core.envs_managerr>   core.subdir_datar?   models.match_specr@   models.recordsr   models.versionrA   	reportersrB   r'   get_exact_valuesubdirsenvsrT   
exceptionsrY   jsoninfopretty_recordappendrg   rh   ri   rd   printjoinchannelsrU   	query_allskip_flexible_searchro   models.channelrp   r   list)r8   r9   r<   r=   r>   r?   r@   rB   specr{   prefix_matchesordered_resultrY   	pkg_grouprO   builderspec_channelchannel_urlsmatches	flex_specro   rp   json_objmatchrecordr   rA   s   &&                       @@r   executer      s    '(6--.-'T__%DH%%''13//yyy6tf=>>/5N"U # ,:#UU # ,:# N  ">+TF33 "% ?. <<<': 9 YYY+	%&788D!$' 9 ,6 9  	G ,	%&788DNN !II LL JJ LL--%j11	 9 , $))G$%	'	(	(++I6*6G<L<L  |W=L
	 
) 44449M9Mf9U9Ud1TYYKq)9:	|||(jDE  L'BL

 @5-F$W%5%5w?
 	
 |||t$EUZZ ''. H6 3 
F&! 0 3 
 
 FNN KKNNLLNN''  	dii !_ ?>>n 
)	(	(s    !AP3$P3AQ3Q	Q	c                    V ^8  d   QhRRRR/# )r   r   r   r   strr   )r   s   "r   r   r   7  s     - -- -C -r   c                  a a ^RI Hp ^RIHp VV 3R lp. oSP	                  S P
                   RS P                   RS P                   24       SP	                  R\        S^ ,          4      ,          4       V! RR4       V! RR4       V! R	R	4       V! R
R
4       V! RR4       \        S RR4      pVe    SP	                  R:R RV! V4      : 24       V! RR4       V! RR4       V! RR4       V! RR4       S P                  '       d~   \        S P                  \        \        34      '       dX   \        P                  ! S P                  \         P"                  4      P%                  R4      pSP	                  R:R RV: 24       S P&                  '       d*   SP	                  R:R RV! S P&                  4      : 24       S P(                  '       d*   SP	                  R:R RV! S P(                  4      : 24       SP	                  R:R RS P*                  '       d   V! S P*                  4      MR: 24       SP	                  R4       RP-                  S4      # )z0
Format a `PackageRecord` for `pretty_record()`
)dashlist)human_bytesc                `   < \        SVR 4      pVe   SP                  V :R RV: 24       R # R # )N12: )getattrr   )display_name	attr_namevaluer   r   s   && r   	push_line(_pretty_record_format.<locals>.push_line?  s-    	40NN,>? r   r\   -z	file namefnrg   rh   ri   zbuild numberbuild_numbersizeNr   r   licenser$   urlmd5z%Y-%m-%d %H:%M:%S %Z	timestamptrack_featuresconstraintsdependenciesz[]rc   )	common.ior   utilsr   r   rg   rh   ri   lenr   r   
isinstancer:   floatr   fromtimestampr   utcstrftimer   
constrainsdependsr   )r   r   r   r   r   date_strr   s   f     @r   _pretty_record_formatr   7  s   
 %#@
 GNNfkk]!FNN#31V\\NCDNN3WQZ()k4 ffi#gwnn-664(Dfk$.?@Ai#h!eUeUJv'7'7#uFF))&*:*:HLLIRR"
 	k8<=+Xf6K6K-LM	
 mXf>O>O5PQRNNv~~~8FNN34O	Q NN499Wr   c                    V ^8  d   QhRRRR/# )r   r   r   r   Noner   )r   s   "r   r   r   g  s     ) )- ) )r   c                (    V! \        V 4      4       R# )zX
Pretty prints a `PackageRecord`.

:param record:  The `PackageRecord` object to print.
N)r   )r   r   s   &&r   r   r   g  s     


'(r   N)__doc__
__future__r   argparser   collectionsr   r   r   typingr   r/   r   r	   r
   r   rw   r   r6   r   r   r   r   r   r   r   <module>r      sM   
 #  # '   &EE.SlGT-` 05 ) )r   