
    0]                        d dl mZ d dlZd dlZd dlZd dlmZ d dlZd dlZd dlm	Z	m
Z
 d dlmZ d dlmZ d dlmZmZmZ d Zd	 Z ej                     ej        d
de           ej        dde           ej        dd           ej        dd           ej        dd ej                               ej        de          d                                                                                     ZdS )    )print_functionN)glob)ProcessPoolExecutoras_completed)__version__)Verify)DummyExecutorrender_metadata	iter_cfgsc           
      :   g }t                      D ]}t          | |          }|                    di                               dd                                          dk    r7|                    |                    t          j        || |d                     |S )Nbuildskip trueF)rendered_meta
recipe_dirchecks_to_ignoreexit_on_error)r   r
   getlowerappendsubmitr   verify_recipe)pathexecutorignorefuturescfgmetas         0lib/python3.11/site-packages/conda_verify/cli.py_submit_verify_reciper!      s    G{{  tS))88GR  $$VR006688FBBNN("&#%+"'       N    c                     | d f}	 t          j        | |d          }n0# t          t          f$ r}| t	          |          gf}Y d }~nd }~ww xY w|S )NF)path_to_packager   r   )r   verify_packageKeyErrorOSErrorstr)r   r   package_issueses       r    _submit_verify_packager+   !   sx    D\N*. 6
 
 
 g * * *Q)*s    AAApaths)nargstypez--ignore   z--exitT)is_flagz--debugz
--out-filezconda-verify)	prog_nameversionc           	         |r|                     d          }i }g }g }| D ]k}t          t          j                            |                    }	|	s&t          d|z             t          j        d           |                    |	           l |rt          nt                      5 }
|D ]}t          j                            |d          }t          j                            |          r%|                    t          ||
|                     f|                    d          r/|                    |
                    t"          ||                     t%          j        t'          |          t)          |          d          D ] }|                                \  }}|r|||<   !	 ddd           n# 1 swxY w Y   |rPt-          |d	          5 }t/          j        ||           t          d
|z             ddd           n# 1 swxY w Y   n|                                D ]\  }}t          dt)          |          z             t          |           t          dt)          |          z             t5          |          D ]a}	 t          |t          j                   # t8          $ r6 t          d                    |j                  t          j                   Y ^w xY w|r|rt          j        d           dS dS dS )zconda-verify is a tool for validating conda packages and recipes.

    To validate a package:

    $  conda-verify path/to/package.tar.bz2

    To validate a recipe:

    $  conda-verify path/to/recipe_directory/
    ,z*Error: path spec %s didn't match any filesr0   z	meta.yaml)z.tar.bz2z.tarz.condaF)totalleaveNwzsaved to %s-)filez>Could not print message for error code {} due to unicode error)splitr   osr   
expanduserprintsysexitextendr	   r   joinisfiler!   endswithr   r   r+   tqdmr   lenresultopenjsondumpitemssortedstderrUnicodeEncodeErrorformatcode)r,   r   r@   debugout_filer)   r   
paths_globr   
glob_pathsr   	meta_filefissueschecks                  r    clirY   ,   s      #c""NGJ & &"',,T2233
 	>EFFFHQKKK*%%%%
95
9--&9	<	< 
. 	V 	VDT;77Iw~~i(( V4T8VLLMMMM=>> Vx/EtVTTUUU<00GERRR 	. 	.A88::LD& .'-t$	.
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
. 
.  (C   	,AIna(((-(*+++	, 	, 	, 	, 	, 	, 	, 	, 	, 	, 	, 	, 	, 	, 	, +0022 	 	LD&#D		/"""$KKK#D		/""" 	 	%cj11111)   X__!J  !Z	     	      s7   $D F11F58F5(HH	HJ""=K"!K")
__future__r   rI   r<   r?   r   clickrE   concurrent.futuresr   r   conda_verifyr   conda_verify.verifyr   conda_verify.utilitiesr	   r
   r   r!   r+   commandargumentr(   optionPathversion_optionrY    r"   r    <module>rf      s   % % % % % %  				 



         @ @ @ @ @ @ @ @ $ $ $ $ $ $ & & & & & & L L L L L L L L L L  "   r,,,j,,,h%%%i&&&l!*%*,,777DDD6 6 ED 87 '& &% -, -, 6 6 6r"   