_i`ddlZddlZddlmZmZddlmcmZGddejZy)N)productstarmapc^eZdZdZdZdZdZedZdZ edZ d dZ d Z y ) install_libz9Don't add compiled flags to filenames of non-Python filescl|j|j}||j|yyN)buildinstall byte_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 ' cfdjD}t|j}tt j |S)z Return a collections.Sized collections.Container of paths to be excluded for single_version_externally_managed installations. c3NK|]}j|D]}|ywr) _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` rget_exclusionszinstall_lib.get_exclusionssJ  --/ \4+D+D+FG 7411:>??rc|jd|gz}tjj|jg|S)zw Given a package name and exclusion path within that package, compute the full exclusion path. .)splitospathjoin install_dir)r rexclusion_pathpartss rrzinstall_lib._exclude_pkg_paths7  #.!11ww||D,,5u55rc#JK|r||jd\}}}|ryyw)zn >>> list(install_lib._all_packages('foo.bar.baz')) ['foo.bar.baz', 'foo.bar', 'foo'] r N) rpartition)pkg_namesepchilds rrzinstall_lib._all_packages's, N#+#6#6s#; Hc5s##c|jjsgS|jd}|j}|r|jjSgS)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 rrzinstall_lib._get_SVEM_NSPs1sL  33I00; <<7;t  33CCrc#Kdddttdsytjj ddtj j z}|dz|d z|d z|d zyw) 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 rrz install_lib._gen_exclusion_pathsAsws,- ww||M;9K9K9U9U+UVVmVm\!!\!!sA6A8c |r|r|rJ|j s!tjj|||Sddlm}ddlm g fd}|||| S)Nr)unpack_directory)logc|vrjd|yjd|tjj |j ||S)Nz/Skipping installation of %s (namespace package)Fzcopying %s -> %s)warninfor"r#dirnameappend)srcdstexcluder=r s rpfz!install_lib.copy_tree..pflsKg~JCP HH'bggooc.B C OOC Jr)rorigr copy_treesetuptools.archive_utilr< distutilsr=) r infileoutfile preserve_modepreserve_timespreserve_symlinkslevelr<rFrEr=r s @@@rrHzinstall_lib.copy_treeVsd8III%%'##--dFGD D =!  "-rctjj|}|j}|r|Dcgc] }||vs| c}S|Scc}wr)rGr get_outputsr)r outputsrEfs rrRzinstall_lib.get_outputsxsO""..t4%%' &;w!!7*:Aw; ;r_s( &,,v$""vr