_i ` d dl Z d dlZd dlmZmZ d dlmc mZ G d dej Zy) N)productstarmapc ^ e Zd ZdZd Zd Zd Zed Zd Z ed Z
ddZd Zy
)install_libz9Don't add compiled flags to filenames of non-Python filesc l | j | j }|| j | y y N)buildinstallbyte_compile)selfoutfiless /builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/command/install_lib.pyrunzinstall_lib.run
s/
<<>h' c fd j D }t | j }t t j
| S )z
Return a collections.Sized collections.Container of paths to be
excluded for single_version_externally_managed installations.
c 3 N K | ] }j | D ] }| y wr )
_all_packages).0ns_pkgpkgr s r z-install_lib.get_exclusions.. s1
/))&1
1
/s "%)_get_SVEM_NSPsr _gen_exclusion_pathssetr _exclude_pkg_path)r all_packages
excl_specss ` r get_exclusionszinstall_lib.get_exclusions sJ
--/
\4+D+D+FG
7411:>??r c |j d |gz }t j j | j g| S )zw
Given a package name and exclusion path within that package,
compute the full exclusion path.
.)splitospathjoininstall_dir)r r exclusion_pathpartss r r zinstall_lib._exclude_pkg_path s7
#.!11ww||D,,5u55r c # J K | r| | j d \ } }}| ryyw)zn
>>> list(install_lib._all_packages('foo.bar.baz'))
['foo.bar.baz', 'foo.bar', 'foo']
r N)
rpartition)pkg_namesepchilds r r zinstall_lib._all_packages' s, N#+#6#6s#; Hc5 s ##c | j j sg S | j d }|j }|r| j j S g S )z
Get namespace packages (list) but only for
single_version_externally_managed installations and empty otherwise.
r
)distributionnamespace_packagesget_finalized_command!single_version_externally_managed)r install_cmdsvems r r zinstall_lib._get_SVEM_NSPs1 sL 33I00;<<7;t 33CCr c # K d d d t t d syt j j ddt j
j z } | dz | d z | d
z | dz yw)zk
Generate file paths to be excluded for namespace packages (bytecode
cache files).
z__init__.pyz__init__.pycz__init__.pyoimplementationN__pycache__z __init__.z.pycz.pyoz
.opt-1.pycz
.opt-2.pyc)hasattrsysr" r# r$ r5 cache_tag)bases r r z install_lib._gen_exclusion_pathsA sw s,-ww||M;9K9K9U9U+UVVmVm\!!\!!s A6A8c
|r|r|rJ | j s!t j j | || S ddlm} ddlm
g
fd} |||| S )Nr )unpack_directory)logc |v rj d| yj d| t j j | j | |S )Nz/Skipping installation of %s (namespace package)Fzcopying %s -> %s)warninfor" r# dirnameappend)srcdstexcluder= r
s r pfz!install_lib.copy_tree..pfl sK g~JCPHH'bggooc.BCOOC Jr )r origr copy_treesetuptools.archive_utilr<