B
    b3                 @   s^   d Z dZddlZddlmZ d\aadd Zdd	 Zd
d Z	ej

ee	Zdd Zdd ZdS )zSCons.Tool.filesystem

Tool-specific initialization for the filesystem tools.

There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
z,__FILE__ __REVISION__ __DATE__ __DEVELOPER__    N)copyFunc)NNc                s0   g }x"| D ] | fdd|D  }q
W ||fS )ze changes the path of the source to be under the target (which
    are assumed to be directories.
    c                s   g | ]}  t|qS  )ZFilestr).0s)tr   4lib/python3.7/site-packages/SCons/Tool/filesystem.py
<listcomp>/   s    z"copyto_emitter.<locals>.<listcomp>r   )targetsourceenvZn_targetr   )r   r   copyto_emitter(   s    
r   c             C   sh   t | t |ks4tdttt| ttt|f x.t| |D ] \}}t| | |r@dS q@W dS )Nz
target: %s
source: %s   r   )lenAssertionErrorlistmapr   zipr   Zget_path)r
   r   r   r   r   r   r   r   copy_action_func3   s
    4r   c             C   s   | |d d| |S )NCOPYSTRr   )Zsubst_target_source)r
   r   r   r   r   r   copy_action_str<   s    r   c          
   C   s   y| d d  | d d  W n t k
r } zntd krVtjjt| jj| jjdtgdat	d krxtjjt| jj| jjda	t| d d< t	| d d< d| d< W d d }~X Y nX d S )	NZBUILDERSZCopyToZCopyAsr   )actiontarget_factorysource_factoryZmultiZemitter)r   r   r   z&Copy file(s): "$SOURCES" to "$TARGETS"r   )
KeyErrorcopyToBuilderSConsZBuildercopy_actionZfsZDirZEntryr   copyAsBuilder)r   er   r   r   generateA   s&    
r    c             C   s   dS )Nr   r   )r   r   r   r   exists[   s    r!   )__doc__Z__revision__r   ZSCons.Tool.installr   r   r   r   r   r   ZActionr   r    r!   r   r   r   r   <module>   s   	