Your IP : 52.14.49.59


Current Path : /usr/lib/python3.6/site-packages/setuptools/command/__pycache__/
Upload File :
Current File : //usr/lib/python3.6/site-packages/setuptools/command/__pycache__/install_lib.cpython-36.pyc

3

9��f�@sBddlZddlZddlmZmZddljjZGdd�dej�ZdS)�N)�product�starmapc@sZeZdZdZdd�Zdd�Zdd�Zedd	��Zd
d�Z	edd
��Z
ddd�Zdd�ZdS)�install_libz9Don't add compiled flags to filenames of non-Python filescCs&|j�|j�}|dk	r"|j|�dS)N)Zbuild�installZbyte_compile)�self�outfiles�r�!/usr/lib/python3.6/install_lib.py�run
szinstall_lib.runcs4�fdd��j�D�}t|�j��}tt�j|��S)z�
        Return a collections.Sized collections.Container of paths to be
        excluded for single_version_externally_managed installations.
        c3s"|]}�j|�D]
}|VqqdS)N)�
_all_packages)�.0Zns_pkg�pkg)rrr	�	<genexpr>sz-install_lib.get_exclusions.<locals>.<genexpr>)�_get_SVEM_NSPsr�_gen_exclusion_paths�setr�_exclude_pkg_path)rZall_packagesZ
excl_specsr)rr	�get_exclusionss
zinstall_lib.get_exclusionscCs$|jd�|g}tjj|jf|��S)zw
        Given a package name and exclusion path within that package,
        compute the full exclusion path.
        �.)�split�os�path�joinZinstall_dir)rr
Zexclusion_path�partsrrr	rszinstall_lib._exclude_pkg_pathccs$x|r|V|jd�\}}}qWdS)zn
        >>> list(install_lib._all_packages('foo.bar.baz'))
        ['foo.bar.baz', 'foo.bar', 'foo']
        rN)�
rpartition)Zpkg_name�sepZchildrrr	r'szinstall_lib._all_packagescCs,|jjsgS|jd�}|j}|r(|jjSgS)z�
        Get namespace packages (list) but only for
        single_version_externally_managed installations and empty otherwise.
        r)ZdistributionZnamespace_packagesZget_finalized_commandZ!single_version_externally_managed)rZinstall_cmdZsvemrrr	r1s

zinstall_lib._get_SVEM_NSPsccsbdVdVdVttd�s dStjjddtj��}|dV|d	V|d
V|dVdS)zk
        Generate file paths to be excluded for namespace packages (bytecode
        cache files).
        z__init__.pyz__init__.pycz__init__.pyo�get_tagN�__pycache__z	__init__.z.pycz.pyoz
.opt-1.pycz
.opt-2.pyc)�hasattr�imprrrr)�baserrr	rAs



z install_lib._gen_exclusion_paths�rc	sj|r|r|st�|j���s.tjj|||�Sddlm}ddlm�g����fdd�}||||��S)Nr)�unpack_directory)�logcs<|�kr�jd|�dS�jd|tjj|���j|�|S)Nz/Skipping installation of %s (namespace package)Fzcopying %s -> %s)�warn�inforr�dirname�append)�src�dst)�excluder#rrr	�pfgs
z!install_lib.copy_tree.<locals>.pf)	�AssertionErrorr�origr�	copy_treeZsetuptools.archive_utilr"Z	distutilsr#)	rZinfileZoutfileZ
preserve_modeZpreserve_timesZpreserve_symlinks�levelr"r+r)r*r#rr	r.Vs
zinstall_lib.copy_treecs.tjj|�}|j���r*�fdd�|D�S|S)Ncsg|]}|�kr|�qSrr)r�f)r*rr	�
<listcomp>xsz+install_lib.get_outputs.<locals>.<listcomp>)r-r�get_outputsr)rZoutputsr)r*r	r2ts
zinstall_lib.get_outputsN)r!r!rr!)
�__name__�
__module__�__qualname__�__doc__r
rr�staticmethodrrrr.r2rrrr	rs

r)	rr�	itertoolsrrZdistutils.command.install_libZcommandrr-rrrr	�<module>s

?>