509318396
Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­
<!DOCTYPE html>
<html>
3

  \Í   ã               @   sH   d dl Z d dlZd dlZd dlmZ d dlmZ dZG dd„ deƒZ	dS )é    N)ÚCommand)ÚDistutilsOptionErrorz.pyc            	   @   s„   e Zd ZdZd*d+d,d-d.d/d0gZdddgZddiZ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'„ Zd(d)„ ZdS )1Úinstall_libz7install all Python modules (extensions and pure Python)úinstall-dir=Údúdirectory to install toú
build-dir=Úbú'build directory (where to install from)ÚforceÚfú-force installation (overwrite existing files)ÚcompileÚcúcompile .py to .pyc [default]ú
no-compileNúdon't compile .py filesú	optimize=ÚOúlalso compile with optimization: -O1 for "python -O", -O2 for "python -OO", and -O0 to disable [default: -O0]ú
skip-buildúskip the build stepsc             C   s(   d | _ d | _d| _d | _d | _d | _d S )Nr   )Úinstall_dirÚ	build_dirr   r   ÚoptimizeÚ
skip_build)Úself© r   ú5/usr/lib64/python3.6/distutils/command/install_lib.pyÚinitialize_options3   s    zinstall_lib.initialize_optionsc             C   s†   | j dddddddƒ | jd kr&d
| _| jd kr6d| _t| jtƒs‚yt| jƒ| _| jdkr^t‚W n  ttfk
r€   tdƒ‚Y nX d S )NÚinstallÚ	build_libr   r   r   r   r   r   r   TFr   é   é   zoptimize must be 0, 1, or 2)r!   r   )r   r   )r   r   )r   r   )r   r   )r   r   )r   r"   r#   )Zset_undefined_optionsr   r   Ú
isinstanceÚintÚAssertionErrorÚ
ValueErrorr   )r   r   r   r   Úfinalize_options<   s$    


zinstall_lib.finalize_optionsc             C   s0   | j ƒ  | jƒ }|d k	r,| jjƒ r,| j|ƒ d S )N)Úbuildr    ÚdistributionÚhas_pure_modulesÚbyte_compile)r   Úoutfilesr   r   r   ÚrunV   s    zinstall_lib.runc             C   s2   | j s.| jjƒ r| jdƒ | jjƒ r.| jdƒ d S )NÚbuild_pyÚ	build_ext)r   r*   r+   Zrun_commandÚhas_ext_modules)r   r   r   r   r)   f   s
    


zinstall_lib.buildc             C   s8   t jj| jƒr | j| j| jƒ}n| jd| j ƒ d S |S )Nz3'%s' does not exist -- no Python modules to install)ÚosÚpathÚisdirr   Z	copy_treer   Úwarn)r   r-   r   r   r   r    m   s    
zinstall_lib.installc             C   sr   t jr| jdƒ d S ddlm} | jdƒj}| jrH||d| j|| j	d� | j
dkrn||| j
| j|| j| j	d� d S )Nz%byte-compiling is disabled, skipping.r   )r,   r    )r   r   ÚprefixÚdry_run)r   r   r6   Úverboser7   )ÚsysÚdont_write_bytecoder5   Zdistutils.utilr,   Úget_finalized_commandÚrootr   r   r7   r   r8   )r   Úfilesr,   Zinstall_rootr   r   r   r,   v   s    


zinstall_lib.byte_compilec       
      C   sh   |sg S | j |ƒ}|jƒ }t||ƒ}t|ƒttjƒ }g }x(|D ] }	|jtjj||	|d … ƒƒ q@W |S )N)	r;   Úget_outputsÚgetattrÚlenr2   ÚsepÚappendr3   Újoin)
r   Zhas_anyZ	build_cmdZ
cmd_optionZ
output_dirZbuild_filesr   Z
prefix_lenZoutputsÚfiler   r   r   Ú_mutate_outputs�   s    


 zinstall_lib._mutate_outputsc             C   sv   g }xl|D ]d}t jjt jj|ƒƒd }|tkr0q
| jrL|jtjj	|dd�ƒ | j
dkr
|jtjj	|| j
d�ƒ q
W |S )Nr"   Ú )Úoptimizationr   )r2   r3   ÚsplitextÚnormcaseÚPYTHON_SOURCE_EXTENSIONr   rB   Ú	importlibÚutilÚcache_from_sourcer   )r   Zpy_filenamesZbytecode_filesZpy_fileZextr   r   r   Ú_bytecode_filenamesž   s    



zinstall_lib._bytecode_filenamesc             C   sR   | j | jjƒ dd| jƒ}| jr*| j|ƒ}ng }| j | jjƒ dd| jƒ}|| | S )Nr/   r!   r0   )rE   r*   r+   r   r   rN   r1   )r   Zpure_outputsZbytecode_outputsZext_outputsr   r   r   r>   ´   s    zinstall_lib.get_outputsc             C   sL   g }| j jƒ r&| jdƒ}|j|jƒ ƒ | j jƒ rH| jdƒ}|j|jƒ ƒ |S )Nr/   r0   )r*   r+   r;   Úextendr>   r1   )r   Zinputsr/   r0   r   r   r   Ú
get_inputsÉ   s    



zinstall_lib.get_inputs)r   r   r   )r   r	   r
   )r   r   r   )r   r   r   )r   Nr   )r   r   r   )r   Nr   )Ú__name__Ú
__module__Ú__qualname__ZdescriptionZuser_optionsZboolean_optionsZnegative_optr   r(   r.   r)   r    r,   rE   rN   r>   rP   r   r   r   r   r      s*    
		r   )
r2   Úimportlib.utilrK   r9   Zdistutils.corer   Zdistutils.errorsr   rJ   r   r   r   r   r   Ú<module>   s   