<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>

Š¹¼]æ0  ã               @   s¼   d  d l  Z  d  d l Z d  d l Z d  d l Z d  d l m Z d  d l m Z m Z d  d l	 m
 Z
 Gd d „  d ƒ Z d d „  Z e  j d	 d
 „ Z d d „  Z d d d  d d „ Z d S)é    N)Úconvert_path)ÚDistutilsTemplateErrorÚDistutilsInternalError)Úlogc               @   s¾   e  Z d  Z d d d d „ Z d d „  Z e j d d „ Z d d	 „  Z d
 d „  Z	 d d „  Z
 d d „  Z d d „  Z d d „  Z d d „  Z d d d d d „ Z d d d d d „ Z d S)ÚFileListNc             C   s   d  |  _  g  |  _ d  S)N)ÚallfilesÚfiles)ÚselfÚwarnÚdebug_print© r   ú-/opt/alt/python35/lib64/python3.5/filelist.pyÚ__init__   s    	zFileList.__init__c             C   s   | |  _  d  S)N)r   )r	   r   r   r   r   Úset_allfiles#   s    zFileList.set_allfilesc             C   s   t  | ƒ |  _ d  S)N)Úfindallr   )r	   Údirr   r   r   r   &   s    zFileList.findallc             C   s$   d d l  m } | r  t | ƒ d  S)Nr   )ÚDEBUG)Zdistutils.debugr   Úprint)r	   Úmsgr   r   r   r   r   )   s    zFileList.debug_printc             C   s   |  j  j | ƒ d  S)N)r   Úappend)r	   Úitemr   r   r   r   3   s    zFileList.appendc             C   s   |  j  j | ƒ d  S)N)r   Úextend)r	   Úitemsr   r   r   r   6   s    zFileList.extendc             C   sX   t  t t j j |  j ƒ ƒ } g  |  _ x* | D]" } |  j j t j j | Œ  ƒ q. Wd  S)N)ÚsortedÚmapÚosÚpathÚsplitr   r   Újoin)r	   Zsortable_filesZ
sort_tupler   r   r   Úsort9   s    	zFileList.sortc             C   sV   xO t  t |  j ƒ d d d ƒ D]. } |  j | |  j | d k r  |  j | =q  Wd  S)Né   r   éÿÿÿÿ)ÚrangeÚlenr   )r	   Úir   r   r   Úremove_duplicatesC   s    &zFileList.remove_duplicatesc             C   s1  | j  ƒ  } | d } d  } } } | d k rr t | ƒ d k  rR t d | ƒ ‚ d d	 „  | d
 d  … Dƒ } n¯ | d k rÐ t | ƒ d k  r  t d | ƒ ‚ t | d
 ƒ } d d	 „  | d d  … Dƒ } nQ | d k rt | ƒ d k rþ t d | ƒ ‚ t | d
 ƒ } n t d | ƒ ‚ | | | | f S)Nr   ÚincludeÚexcludeúglobal-includeúglobal-excludeé   z&'%s' expects <pattern1> <pattern2> ...c             S   s   g  |  ] } t  | ƒ ‘ q Sr   )r   )Ú.0Úwr   r   r   ú
<listcomp>W   s   	 z1FileList._parse_template_line.<locals>.<listcomp>r    úrecursive-includeúrecursive-excludeé   z,'%s' expects <dir> <pattern1> <pattern2> ...c             S   s   g  |  ] } t  | ƒ ‘ q Sr   )r   )r+   r,   r   r   r   r-   ]   s   	 ÚgraftÚprunez#'%s' expects a single <dir_pattern>zunknown action '%s')r&   r'   r(   r)   )r.   r/   )r1   r2   )r   r#   r   r   )r	   ÚlineZwordsÚactionÚpatternsr   Údir_patternr   r   r   Ú_parse_template_lineL   s,    
	  zFileList._parse_template_linec             C   s  |  j  | ƒ \ } } } } | d k rz |  j d d j | ƒ ƒ x½| D]+ } |  j | d d ƒsH t j d | ƒ qH Wn‡| d k rÙ |  j d d j | ƒ ƒ x^| D]+ } |  j | d d ƒs§ t j d	 | ƒ q§ Wn(| d
 k r8|  j d d j | ƒ ƒ xÿ| D]+ } |  j | d d ƒst j d | ƒ qWnÉ| d k r—|  j d d j | ƒ ƒ x | D]+ } |  j | d d ƒset j d | ƒ qeWnj| d k rÿ|  j d | d j | ƒ f ƒ x;| D]. } |  j | d | ƒsÊt j d | | ƒ qÊWn| d k rg|  j d | d j | ƒ f ƒ xÓ | D]. } |  j | d | ƒs2t j d | | ƒ q2Wnš | d k r¬|  j d | ƒ |  j d  d | ƒst j d | ƒ nU | d k rñ|  j d | ƒ |  j d  d | ƒst j d | ƒ n t d | ƒ ‚ d  S)Nr&   zinclude ú Úanchorr    z%warning: no files found matching '%s'r'   zexclude z9warning: no previously-included files found matching '%s'zglobal-includezglobal-include r   z>warning: no files found matching '%s' anywhere in distributionzglobal-excludezglobal-exclude zRwarning: no previously-included files matching '%s' found anywhere in distributionzrecursive-includezrecursive-include %s %sÚprefixz:warning: no files found matching '%s' under directory '%s'zrecursive-excludezrecursive-exclude %s %szNwarning: no previously-included files matching '%s' found under directory '%s'r1   zgraft z+warning: no directories found matching '%s'r2   zprune z6no previously-included directories found matching '%s'z'this cannot happen: invalid action '%s')r7   r   r   Úinclude_patternr   r
   Úexclude_patternr   )r	   r3   r4   r5   r   r6   Úpatternr   r   r   Úprocess_template_lineh   sf    									
	
zFileList.process_template_liner    r   c             C   s–   d } t  | | | | ƒ } |  j d | j ƒ |  j d  k rH |  j ƒ  xG |  j D]< } | j | ƒ rR |  j d | ƒ |  j j | ƒ d } qR W| S)NFz%include_pattern: applying regex r'%s'z adding T)Útranslate_patternr   r=   r   r   Úsearchr   r   )r	   r=   r9   r:   Úis_regexÚfiles_foundÚ
pattern_reÚnamer   r   r   r;   ´   s    	

zFileList.include_patternc             C   s›   d } t  | | | | ƒ } |  j d | j ƒ xe t t |  j ƒ d d d ƒ D]D } | j |  j | ƒ rO |  j d |  j | ƒ |  j | =d } qO W| S)NFz%exclude_pattern: applying regex r'%s'r    z
 removing Tr!   r!   )r?   r   r=   r"   r#   r   r@   )r	   r=   r9   r:   rA   rB   rC   r$   r   r   r   r<   ß   s    	&

zFileList.exclude_pattern)Ú__name__Ú
__module__Ú__qualname__r   r   r   Úcurdirr   r   r   r   r   r%   r7   r>   r;   r<   r   r   r   r   r      s   

	L,r   c             C   s5   d d „  t  j |  d d ƒDƒ } t t  j j | ƒ S)Nc             s   s:   |  ]0 \ } } } | D] } t  j j | | ƒ Vq q d  S)N)r   r   r   )r+   ÚbaseÚdirsr   Úfiler   r   r   ú	<genexpr>û   s   z#_find_all_simple.<locals>.<genexpr>ÚfollowlinksT)r   ÚwalkÚfilterr   Úisfile)r   Úresultsr   r   r   Ú_find_all_simpleö   s    	rR   c             C   sO   t  |  ƒ } |  t j k rE t j t j j d |  ƒ} t | | ƒ } t | ƒ S)NÚstart)	rR   r   rH   Ú	functoolsÚpartialr   Úrelpathr   Úlist)r   r   Zmake_relr   r   r   r     s
    r   c             C   sP   t  j |  ƒ } t j } t j d k r- d } d | } t j d | | ƒ } | S)Nú\z\\\\z\1[^%s]z((?<!\\)(\\\\)*)\.)ÚfnmatchÚ	translater   ÚsepÚreÚsub)r=   rC   r[   Úescapedr   r   r   Ú
glob_to_re  s    	
r_   r    c             C   sÑ   | r& t  |  t ƒ r" t j |  ƒ S|  S|  r; t |  ƒ } n d } | d  k	 r´ t d ƒ } t | ƒ d  t | ƒ … } t j } t j d k r” d } d | j | d | f ƒ } n | rÄ d | } t j | ƒ S)NÚ rX   z\\ú^z.*)	Ú
isinstanceÚstrr\   Úcompiler_   r#   r   r[   r   )r=   r9   r:   rA   rC   Zempty_patternZ	prefix_rer[   r   r   r   r?   %  s"    	 
r?   )r   r\   rY   rT   Zdistutils.utilr   Zdistutils.errorsr   r   Z	distutilsr   r   rR   rH   r   r_   r?   r   r   r   r   Ú<module>   s   è