zmc
2023-08-08 e792e9a60d958b93aef96050644f369feb25d61b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
U
G=®d#ã@sHddlZddlZddlmZmZddlmmZGdd„dejƒZdS)éN)ÚproductÚstarmapc@sZeZdZdZdd„Zdd„Zdd„Zedd    „ƒZd
d „Z    ed d „ƒZ
ddd„Z dd„Z dS)Ú install_libz9Don't add compiled flags to filenames of non-Python filescCs&| ¡| ¡}|dk    r"| |¡dS©N)ÚbuildÚinstallÚ byte_compile)ÚselfÚoutfiles©r úUD:\z\workplace\VsCode\pyvenv\venv\Lib\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©r    r r Ú    <genexpr>s þz-install_lib.get_exclusions.<locals>.<genexpr>)Ú_get_SVEM_NSPsrÚ_gen_exclusion_pathsÚsetrÚ_exclude_pkg_path)r    Z 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ÚjoinZ install_dir)r    rZexclusion_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)Úpkg_nameÚsepÚchildr 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)Ú distributionZnamespace_packagesÚget_finalized_commandZ!single_version_externally_managed)r    Z install_cmdZsvemr r r r1s
 
zinstall_lib._get_SVEM_NSPsccsbdVdVdVttdƒs dStj ddtjj¡}|dV|d    V|d
V|d VdS) 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)ÚsrcÚdst©Úexcluder,r
r r Úpfhsÿ
z!install_lib.copy_tree.<locals>.pf)    ÚAssertionErrorrÚorigrÚ    copy_treeZsetuptools.archive_utilr+Ú    distutilsr,)    r    ÚinfileÚoutfileÚ preserve_modeÚpreserve_timesÚpreserve_symlinksÚlevelr+r5r r3r r8Ws  
zinstall_lib.copy_treecs.tj |¡}| ¡‰ˆr*‡fdd„|DƒS|S)Ncsg|]}|ˆkr|‘qSr r )rÚf©r4r r Ú
<listcomp>ysz+install_lib.get_outputs.<locals>.<listcomp>)r7rÚ get_outputsr)r    Úoutputsr rAr rCus
 zinstall_lib.get_outputsN)r*r*rr*) Ú__name__Ú
__module__Ú __qualname__Ú__doc__r rrÚ staticmethodrrrr8rCr r r r rs
    
r)    rr'Ú    itertoolsrrZdistutils.command.install_libÚcommandrr7r r r r Ú<module>s