ó
į0]c           @  sv   d  d l  m Z d  d l m Z m Z d  d l m Z m Z d  d l m	 Z	 d  d l
 m Z d e f d     YZ d S(	   i’’’’(   t   print_function(   t   CondaPackageCheckt   CondaRecipeCheck(   t   PackageErrort   RecipeError(   t   ensure_list(   t	   getLoggert   Verifyc           B  sA   e  Z d  Z e d d e d   Z e d d d e d   Z RS(   sD   Verify class is called by the CLI but may be used as an API as well.c   	      K  s  t  |   } d | k r" | d s8 d | k rN | d rN t t  j d  n  g  } xi t |  D][ } | j d  ra t | |    } | d k	 r¼ | j t	 |  k r¼ | j
 |  q¼ qa qa W| rŪ | rŪ t |   n  |  t g  | D] } d j | d   ^ qč  f S(   sö   Run all package checks in order to verify a conda package.
        checks_to_ignore should be a list, tuple, or set of codes, such as ['C1102', 'C1104'].
        Codes are listed in readme.md.  Package codes follow 1xxx, recipe codes follow 2xxx.t   ignore_scriptst   run_scriptssĮ   Ignoring legacy ignore_scripts or run_scripts.  These have been replaced by the checks_to_ignore argument, which takes alist of codes, documented at https://github.com/conda/conda-verify#checkst   checks   [{}] {}i   N(   R   R   t   __name__t   warnt   dirt
   startswitht   getattrt   Nonet   codeR   t   appendR   t   sortedt   format(	   t   path_to_packaget   checks_to_ignoret   exit_on_errort   kwt   package_checkt   checks_to_displayt   methodR
   t   c(    (    s2   lib/python2.7/site-packages/conda_verify/verify.pyt   verify_package   s     
c   
      K  s  t  |  |  } d | k r% | d s; d | k rQ | d rQ t t  j d  n  g  } x[ d   t |  D D]C } t | |    } | rn | j t |  k rn | j |  qn qn W| rŌ | rŌ t	 | d   n  | t
 g  | D] }	 d j |	 d   ^ qį  f S(   sō   Run all recipe checks in order to verify a conda recipe.
        checks_to_ignore should be a list, tuple, or set of codes, such as ['C2102', 'C2104'].
        Codes are listed in readme.md.  Package codes follow 1xxx, recipe codes follow 2xxx.R   R	   sĮ   Ignoring legacy ignore_scripts or run_scripts.  These have been replaced by the checks_to_ignore argument, which takes alist of codes, documented at https://github.com/conda/conda-verify#checksc         s  s$   |  ] } | j  d   r | Vq d S(   t   check_N(   R   (   t   .0t   _(    (    s2   lib/python2.7/site-packages/conda_verify/verify.pys	   <genexpr>J   s    i    s   [{}] {}i   (   R   R   R   R   R   R   R   R   R   R   R   R   (
   t   rendered_metat
   recipe_dirR   R   R   t   recipe_checkR   R   R
   R   (    (    s2   lib/python2.7/site-packages/conda_verify/verify.pyt   verify_recipe3   s    
N(   R   t
   __module__t   __doc__t   staticmethodR   t   FalseR   R$   (    (    (    s2   lib/python2.7/site-packages/conda_verify/verify.pyR   
   s   $N(   t
   __future__R    t   conda_verify.checksR   R   t   conda_verify.errorsR   R   t   conda_verify.utilitiesR   t   loggingR   t   objectR   (    (    (    s2   lib/python2.7/site-packages/conda_verify/verify.pyt   <module>   s
   