OwlCyberSecurity - MANAGER
Edit File: install_lib.cpython-36.pyc
3 � \� ������������������@���sL���d�Z�ddlZddlZddlZddlmZ�ddlmZ�dZ G�dd��de�Z dS�)zkdistutils.command.install_lib Implements the Distutils 'install_lib' command (install all Python modules).�����N)�Command)�DistutilsOptionErrorz.pyc������������ ���@���s����e�Zd�ZdZd*d+d,d-d.d/d0gZdddgZddiZdd��Zdd��Zdd��Z dd��Z dd��Zd d!��Zd"d#��Z d$d%��Zd&d'��Zd(d)��ZdS�)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����zinstall_lib.initialize_optionsc�������������C���s����|�j�ddddddd��|�jd�kr&d |�_|�jd�kr6d|�_t|�jt�s�yt|�j�|�_|�jdkr^t�W�n �ttfk r����td��Y�nX�d�S�)N�install� build_libr���r���r���r���r���r���r���TFr�����������zoptimize must be 0, 1, or 2)r!���r���)r���r���)r���r���)r���r���)r���r���)r���r���)r���r"���r#���)Zset_undefined_optionsr���r���� isinstance�int�AssertionError� ValueErrorr���)r���r���r���r����finalize_options<���s$���� zinstall_lib.finalize_optionsc�������������C���s0���|�j����|�j��}|d�k r,|�jj��r,|�j|��d�S�)N)�buildr ����distribution�has_pure_modules�byte_compile)r����outfilesr���r���r����runV���s����zinstall_lib.runc�������������C���s2���|�j�s.|�jj��r|�jd��|�jj��r.|�jd��d�S�)N�build_py� build_ext)r���r*���r+���Zrun_command�has_ext_modules)r���r���r���r���r)���f���s ���� zinstall_lib.buildc�������������C���s8���t�jj|�j�r |�j|�j|�j�}n|�jd|�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���� zinstall_lib.installc�������������C���sr���t�jr|�jd��d�S�ddlm}�|�jd�j}|�jrH||d|�j||�j d��|�j dkrn|||�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���Zdistutils.utilr,����get_finalized_command�rootr���r���r7���r���r8���)r����filesr,���Zinstall_rootr���r���r���r,���v���s���� zinstall_lib.byte_compilec������� ������C���sh���|sg�S�|�j�|�}|j��}t||�}t|�ttj��}g�}x(|D�] } |jtjj|| |d������q@W�|S�)N) r;����get_outputs�getattr�lenr2����sep�appendr3����join) r���Zhas_anyZ build_cmdZ cmd_optionZ output_dirZbuild_filesr���Z prefix_lenZoutputs�filer���r���r����_mutate_outputs����s���� zinstall_lib._mutate_outputsc�������������C���sv���g�}xl|D�]d}t�jjt�jj|��d�}|tkr0q |�jrL|jtjj |dd���|�j dkr |jtjj ||�j d���q W�|S�)Nr"�����)�optimizationr���)r2���r3����splitext�normcase�PYTHON_SOURCE_EXTENSIONr���rB���� importlib�util�cache_from_sourcer���)r���Zpy_filenamesZbytecode_filesZpy_fileZextr���r���r����_bytecode_filenames����s���� zinstall_lib._bytecode_filenamesc�������������C���sR���|�j�|�jj��dd|�j�}|�jr*|�j|�}ng�}|�j�|�jj��dd|�j�}||�|�S�)z�Return the list of files that would be installed if this command were actually run. Not affected by the "dry-run" flag or whether modules have actually been built yet. r/���r!���r0���)rE���r*���r+���r���r���rN���r1���)r���Zpure_outputsZbytecode_outputsZext_outputsr���r���r���r>�������s����zinstall_lib.get_outputsc�������������C���sL���g�}|�j�j��r&|�jd�}|j|j����|�j�j��rH|�jd�}|j|j����|S�)z�Get the list of files that are input to this command, ie. the files that get installed as they are named in the build tree. The files in this list correspond one-to-one to the output filenames returned by 'get_outputs()'. r/���r0���)r*���r+���r;����extendr>���r1���)r���Zinputsr/���r0���r���r���r���� get_inputs����s���� zinstall_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__ZdescriptionZuser_optionsZboolean_optionsZnegative_optr���r(���r.���r)���r ���r,���rE���rN���r>���rP���r���r���r���r���r������s*���� r���)�__doc__r2����importlib.utilrK���r9���Zdistutils.corer���Zdistutils.errorsr���rJ���r���r���r���r���r����<module>���s���