Your IP : 3.148.105.152


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

U

�Qab�@sHddlZddlZddlmZmZddlmmZGdd�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&|��|��}|dk	r"|�|�dS�N)Zbuild�installZbyte_compile)�self�outfiles�r	�B/usr/lib/python3.8/site-packages/setuptools/command/install_lib.py�run
szinstall_lib.runcs4�fdd����D�}t|����}tt�j|��S)z�
        Return a collections.Sized collections.Container of paths to be
        excluded for single_version_externally_managed installations.
        c3s"|]}��|�D]
}|VqqdSr)�
_all_packages)�.0Zns_pkg�pkg�rr	r
�	<genexpr>s�z-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$|�d�|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)rrZexclusion_path�partsr	r	r
rszinstall_lib._exclude_pkg_pathccs |r|V|�d�\}}}qdS)zn
        >>> list(install_lib._all_packages('foo.bar.baz'))
        ['foo.bar.baz', 'foo.bar', 'foo']
        rN)�
rpartition)Zpkg_name�sepZchildr	r	r
r'szinstall_lib._all_packagescCs,|jjsgS|�d�}|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_cmdZsvemr	r	r
r1s

zinstall_lib._get_SVEM_NSPsccsbdVdVdVttd�s dStj�ddtjj�}|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�implementationN�__pycache__z	__init__.z.pycz.pyoz
.opt-1.pycz
.opt-2.pyc)�hasattr�sysrrrr�	cache_tag)�baser	r	r
rAs



z install_lib._gen_exclusion_paths�rc	sh|r|r|rt�|����s,tj�|||�Sddlm}ddlm�g����fdd�}||||��S)Nr)�unpack_directory)�logcs<|�kr��d|�dS��d|tj�|����|�|S)Nz/Skipping installation of %s (namespace package)Fzcopying %s -> %s)�warn�inforr�dirname�append)�srcZdst��excluder&rr	r
�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
r1Vs
zinstall_lib.copy_treecs.tj�|�}|����r*�fdd�|D�S|S)Ncsg|]}|�kr|�qSr	r	)r
�f�r-r	r
�
<listcomp>xsz+install_lib.get_outputs.<locals>.<listcomp>)r0r�get_outputsr)rZoutputsr	r4r
r6ts
zinstall_lib.get_outputsN)r$r$rr$)
�__name__�
__module__�__qualname__�__doc__rrr�staticmethodrrrr1r6r	r	r	r
rs
	
�
r)	rr!�	itertoolsrrZdistutils.command.install_libZcommandrr0r	r	r	r
�<module>s

?>