<!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>

]J                 @   s   d  d l  Z  d  d l Z d  d l Z d  d l m Z d  d l m Z m Z m Z m	 Z	 m
 Z
 d  d l m Z Gd d   d  Z Gd d   d e  Z d S)	    N)DistutilsOptionError)utildir_util	file_utilarchive_utildep_util)logc               @   s  e  Z d  Z g  Z d d   Z d d   Z d d   Z d d   Z d	 d
   Z d d d d  Z	 d d   Z
 d d d  Z d d   Z d d d  Z d d d  Z d d   Z d d d  Z d d   Z d  d!   Z d" d#   Z d$ d%   Z d d& d'  Z d( d) d*  Z d+ d,   Z d- d.   Z d/ d0   Z d d d1 d2  Z d3 d4 d5  Z d d d d d6 d7  Z d d d( d d8 d9  Z d d: d;  Z d d d< d=  Z d d d d d> d?  Z  d d d d@ dA  Z! d S)BCommandc             C   s   d d l  m } t | |  s+ t d   |  j t k rF t d   | |  _ |  j   d  |  _	 | j
 |  _
 d  |  _ d |  _ d |  _ d  S)Nr   )Distributionz$dist must be a Distribution instancezCommand is an abstract class)Zdistutils.distr
   
isinstance	TypeError	__class__r	   RuntimeErrordistributioninitialize_optionsZ_dry_runverboseforcehelp	finalized)selfZdistr
    r   (/opt/alt/python35/lib64/python3.5/cmd.py__init__/   s    	

			zCommand.__init__c             C   sR   | d k rB t  |  d |  } | d  k r; t  |  j |  S| Sn t |   d  S)Ndry_run_)getattrr   AttributeError)r   attrZmyvalr   r   r   __getattr___   s    zCommand.__getattr__c             C   s    |  j  s |  j   d |  _  d  S)N   )r   finalize_options)r   r   r   r   ensure_finalizedi   s    	
zCommand.ensure_finalizedc             C   s   t  d |  j   d  S)Nz,abstract method -- subclass %s must override)r   r   )r   r   r   r   r   {   s    
zCommand.initialize_optionsc             C   s   t  d |  j   d  S)Nz,abstract method -- subclass %s must override)r   r   )r   r   r   r   r       s    zCommand.finalize_optionsN c             C   s   d d l  m } | d  k r, d |  j   } |  j | | d t j | d } x| |  j D]q \ } } } | j |  } | d	 d k r | d  d
  } t |  |  } |  j | d | | f d t j qZ Wd  S)Nr   )longopt_xlatezcommand options for '%s':levelz  r   =z%s = %sr&   )	Zdistutils.fancy_getoptr#   get_command_nameannouncer   INFOuser_options	translater   )r   headerindentr#   optionr   valuer   r   r   dump_options   s    
zCommand.dump_optionsc             C   s   t  d |  j   d  S)Nz,abstract method -- subclass %s must override)r   r   )r   r   r   r   run   s    
zCommand.runr   c             C   s   t  j  | |  d  S)N)r   )r   msgr$   r   r   r   r(      s    zCommand.announcec             C   s1   d d l  m } | r- t |  t j j   d  S)Nr   )DEBUG)Zdistutils.debugr3   printsysstdoutflush)r   r2   r3   r   r   r   debug_print   s    
zCommand.debug_printc             C   s[   t  |  |  } | d  k r/ t |  | |  | St | t  sW t d | | | f   | S)Nz'%s' must be a %s (got `%s`))r   setattrr   strr   )r   r.   whatdefaultvalr   r   r   _ensure_stringlike   s    zCommand._ensure_stringlikec             C   s   |  j  | d |  d  S)Nstring)r>   )r   r.   r<   r   r   r   ensure_string   s    zCommand.ensure_stringc             C   s   t  |  |  } | d  k r d  St | t  rM t |  | t j d |   nM t | t  rx t d d   | D  } n d } | s t d | | f   d  S)Nz,\s*|\s+c             s   s   |  ] } t  | t  Vq d  S)N)r   r:   ).0vr   r   r   	<genexpr>   s    z-Command.ensure_string_list.<locals>.<genexpr>Fz''%s' must be a list of strings (got %r))	r   r   r:   r9   resplitlistallr   )r   r.   r=   okr   r   r   ensure_string_list   s    zCommand.ensure_string_listc             C   sL   |  j  | | |  } | d  k	 rH | |  rH t d | | | f   d  S)Nzerror in '%s' option: )r>   r   )r   r.   Ztesterr;   Z	error_fmtr<   r=   r   r   r   _ensure_tested_string   s    
zCommand._ensure_tested_stringc             C   s    |  j  | t j j d d  d  S)Nfilenamez$'%s' does not exist or is not a file)rJ   ospathisfile)r   r.   r   r   r   ensure_filename   s    zCommand.ensure_filenamec             C   s    |  j  | t j j d d  d  S)Nzdirectory namez)'%s' does not exist or is not a directory)rJ   rL   rM   isdir)r   r.   r   r   r   ensure_dirname  s    zCommand.ensure_dirnamec             C   s$   t  |  d  r |  j S|  j j Sd  S)Ncommand_name)hasattrrR   r   __name__)r   r   r   r   r'   	  s    zCommand.get_command_namec             G   se   |  j  j |  } | j   xB | D]: \ } } t |  |  d  k r# t |  | t | |   q# Wd  S)N)r   get_command_objr!   r   r9   )r   Zsrc_cmdZoption_pairsZsrc_cmd_objZ
src_optionZ
dst_optionr   r   r   set_undefined_options  s
    
zCommand.set_undefined_optionsc             C   s#   |  j  j | |  } | j   | S)N)r   rU   r!   )r   commandZcreateZcmd_objr   r   r   get_finalized_command$  s    
zCommand.get_finalized_commandr   c             C   s   |  j  j | |  S)N)r   reinitialize_command)r   rW   Zreinit_subcommandsr   r   r   rY   0  s    zCommand.reinitialize_commandc             C   s   |  j  j |  d  S)N)r   run_command)r   rW   r   r   r   rZ   4  s    zCommand.run_commandc             C   sI   g  } x< |  j  D]1 \ } } | d  k s4 | |   r | j |  q W| S)N)sub_commandsappend)r   commandsZcmd_namemethodr   r   r   get_sub_commands;  s
    zCommand.get_sub_commandsc             C   s!   t  j d |  j   | f  d  S)Nzwarning: %s: %s
)r   warnr'   )r   r2   r   r   r   r`   K  s    	zCommand.warnc             C   s    t  j | | | d |  j d  S)Nr   )r   executer   )r   funcargsr2   r$   r   r   r   ra   O  s    zCommand.executei  c             C   s   t  j | | d |  j d  S)Nr   )r   mkpathr   )r   namemoder   r   r   rd   R  s    zCommand.mkpathc          	   C   s)   t  j | | | | |  j | d |  j S)Nr   )r   	copy_filer   r   )r   infileoutfilepreserve_modepreserve_timeslinkr$   r   r   r   rg   U  s    zCommand.copy_filec          	   C   s)   t  j | | | | | |  j d |  j S)Nr   )r   	copy_treer   r   )r   rh   ri   rj   rk   Zpreserve_symlinksr$   r   r   r   rm   ^  s    zCommand.copy_treec             C   s   t  j | | d |  j S)Nr   )r   	move_filer   )r   srcdstr$   r   r   r   rn   g  s    zCommand.move_filec             C   s*   d d l  m } | | | d |  j d  S)Nr   )spawnr   )Zdistutils.spawnrq   r   )r   cmdZsearch_pathr$   rq   r   r   r   rq   k  s    zCommand.spawnc             C   s+   t  j | | | | d |  j d | d | S)Nr   ownergroup)r   make_archiver   )r   	base_nameformatroot_dirbase_dirrs   rt   r   r   r   ru   p  s    	zCommand.make_archivec             C   s   | d  k r d | } t  | t  r1 | f } n! t  | t t f  sR t d   | d  k rw d | d j |  f } |  j s t j | |  r |  j	 | | | |  n t
 j |  d  S)Nzskipping %s (inputs unchanged)z9'infiles' must be a string, or a list or tuple of stringszgenerating %s from %sz, )r   r:   rF   tupler   joinr   r   Znewer_groupra   r   debug)r   Zinfilesri   rb   rc   Zexec_msgZskip_msgr$   r   r   r   	make_filev  s    

	zCommand.make_file)"rT   
__module____qualname__r[   r   r   r!   r   r    r0   r1   r(   r8   r>   r@   rI   rJ   rO   rQ   r'   rV   rX   rY   rZ   r_   r`   ra   rd   rg   rm   rn   rq   ru   r}   r   r   r   r   r	      sD   0

r	   c               @   sI   e  Z d  Z d g Z d d   Z d d   Z d d	   Z d
 d   Z d S)install_miscinstall-dir=d!directory to install the files toc             C   s   d  |  _  g  |  _ d  S)N)install_diroutfiles)r   r   r   r   r     s    	zinstall_misc.initialize_optionsc             C   s   |  j  d | d f  d  S)Ninstallr   )rV   )r   dirnamer   r   r   _install_dir_from  s    zinstall_misc._install_dir_fromc             C   sm   g  |  _  | s d  S|  j |  j  xC | D]; } |  j | |  j  |  j  j t j j |  j |   q* Wd  S)N)r   rd   r   rg   r\   rL   rM   r{   )r   Zfilelistfr   r   r   _copy_files  s    	zinstall_misc._copy_filesc             C   s   |  j  S)N)r   )r   r   r   r   get_outputs  s    zinstall_misc.get_outputsN)r   r   r   )rT   r~   r   r*   r   r   r   r   r   r   r   r   r     s
   		r   )r5   rL   rD   Zdistutils.errorsr   Z	distutilsr   r   r   r   r   r   r	   r   r   r   r   r   <module>   s   $( 