+
    kGj                         ^ 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HtHt ^ RIHt R R ltR R ltR R ltR R ltR# )    N)	Namespace_SubParsersAction)PackageMetadata)Path)dals)ArgumentError)	WheelFile)InvalidRequirement)sha256_checksum)UnableToConvertToRepodataEntry)create_channel_indexstore_pypi_metadataupdate_index)#package_metadata_from_metadata_bodyc                (    V ^8  d   QhR\         RR/# )   parserreturnN)r   )formats   "4lib/python3.14/site-packages/conda_pypi/cli/index.py__annotate__r      s      . 4     c                    RpTp\        R4      pV P                  RVVVR7      pVP                  RR\        RR7       VP                  R	R
R7       R# )z;Configure all subcommand arguments and options via argparsez;Index a directory of `.whl` files to generate repodata.jsona.  
    Creates a local conda channel from a collection of wheel files.
    Examples:
    Index a directory of wheel files to create a local conda channel::

    conda pypi index path/to/my_wheels/

  Use the generated channel with conda::

    conda install -c file:///path/to/my_wheels some-package
    index)helpdescriptionepilog	directory	DIRECTORYz(Directory containing .whl files to index)metavartyper   z
--base-urlzBase URL for the channel (e.g. https://packages.example.com/). When omitted, each entry uses a file:// URI for each wheel file.)r   N)r   
add_parseradd_argumentr   )r   summaryr   r   r   s   &    r   configure_parserr%      s     LGK 
 
	F 	  E 
7	   
 O  r   c                F    V ^8  d   QhR\         R\        \         ,          /# )r   r   r   )r   list)r   s   "r   r   r   3   s     # # #$t* #r   c                :   V P                  4       '       g   \        RV  24      h\        V P                  4       4      pV'       g   \	        RV  24      hV Uu. uF  q"P                  4       '       d   K  VNK  	  ppV'       d   \        RV 24       V Uu. uF  q"P                  4       '       g   K  VNK  	  ppV'       g   \	        RV  24      h. pV F#  pVP                  VP                  R4      4       K%  	  V'       g   \	        RV  24      hV# u upi u upi )zyEnsure provided path is a directory and follows expected structure
Expected structure:
root/
  <package>/ <package>-*.whlzNot a directory: z6No wheel subdirectories found in the given directory: zUFound invalid entries (not wheel directories) in the given directory, ignoring them: z<No valid wheel subdirectories found in the given directory: z*.whlz-No wheel files found in the given directory: )is_dirr   r'   iterdir
SystemExitprintextendglob)r   entriesentryinvalid_entriesvalid_entries
all_wheelss   &     r   !validate_dir_and_return_whl_filesr4   3   s    /	{;<<9$$&'GQR[Q\]^^ +2H'uu'OHcdsctu	

 )0Bu<<>UUMBJ9+V
 	
 J%**W-.  HTUU+ I Cs   D4DD2Dc                <    V ^8  d   QhR\         R\        R\        /# )r   wheelwheel_metadataurl)r   r   str)r   s   "r   r   r   Y   s!      $  c r   c                6   VP                   pRRVP                  R4      RVP                  R4      RVP                  R. 4      RVP                  R4      /RRRR	V P                  R
VRV P                  4       P                  RR\        \        V 4      4      //./pV# )zHReturn expected dict structure of pypi metadata with the relevant fieldsinfonameversionrequires_distrequires_pythonurlspackagetypebdist_wheelfilenamer8   sizedigestssha256)jsongetr<   statst_sizer   r9   )r6   r7   r8   wheel_metadata_json	pypi_datas   &&&  r   pypi_data_dictrM   Y   s     )-- 	'++F3*..y9044_bI2667HI	
 	}EJJs

,,Hoc%j&AB
I" r   c                0    V ^8  d   QhR\         R\        /# )r   argsr   )r   int)r   s   "r   r   r   s   s     2 2) 2 2r   c           	        \        V P                  4      P                  4       pV P                  '       d#   V P                  P	                  R4      R,           p\        V4      p. p\        V4      pVP                  R4      pV F  p \        P                  ! V4      ;_uu_ 4       p\        VP                  R4      4      p	RRR4       V P                  '       d(   XVP                  V4      P                  4       ,           p
MVP                  4       P                  4       p
\!        VX	V
4      p\#        Wk4       K  	  \7        V4       V'       dO   RP9                  R V 4       4      p\'        R\;        V4      \;        V4      ,
           R\;        V4       RV 24       ^ #   + '       g   i     L; i  \$         d:   p\'        RTP(                   RT R24       TP+                  T4        Rp?EKm  Rp?i\,         d:   p\'        RTP(                   RT R24       TP+                  T4        Rp?EK  Rp?i\.         d9   p\'        RTP(                   R	T 24       TP+                  T4        Rp?EK  Rp?i\0        \2        P4                  3 d9   p\'        R
TP(                   R	T 24       TP+                  T4        Rp?EKA  Rp?ii ; i)z1Entry point for the `conda pypi index` subcommand/noarchMETADATANz	Skipping z: not a pure-python wheel ()z: invalid metadata (z: zFailed to read z, c              3   8   "   T F  qP                   x  K  	  R # 5i)N)r<   ).0r6   s   & r   	<genexpr>execute.<locals>.<genexpr>   s      Gs   zIndexed z	 wheels; z	 failed: )r   r   
expanduserbase_urlrstripr4   r   cache_for_subdirr	   openr   read_dist_inforelative_toas_posixresolveas_urirM   r   r   r,   r<   appendr
   
ValueErrorOSErrorzipfile
BadZipFiler   joinlen)rO   r   r[   r3   failed_wheelschannel_indexcacher6   sourcer7   r8   rL   efailed_namess   &             r   executerq   s   sE    T^^$//1I}}}=='',s229=JM )3M**84E	(&&&!D))*5" ' }}}!2!29!=!F!F!HHmmo,,.&uncBI1 2  yy G GGs:]);;<I=!")L>;	

 C '& . 	(Iejj\)DQCqIJ  ''! 	(Iejj\)=aSBC  '' 	(Iejj\A3/0  ''++, 	(OEJJ<r!56  ''	(sm   F1%F F1AF1F.)F11K	<-G00K	=K	>-H22K	?K	 ,I33K	K	,KK	)rg   argparser   r   importlib.metadatar   pathlibr   conda.auxlib.ishr   conda.exceptionsr   installer.sourcesr	   packaging.requirementsr
   conda_pypi.conda_build_utilsr   conda_pypi.exceptionsr   conda_pypi.indexr   r   r   conda_pypi.license_filesr   r%   r4   rM   rq    r   r   <module>r~      sB     1 .  ! * ' 5 8 @ T T HD#L42r   