Viewing File: /usr/lib/python3.6/site-packages/setuptools/command/__pycache__/install_lib.cpython-36.opt-1.pyc

3

Xoöhã@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	sX|jƒ‰ˆstjj|||ƒ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)rÚ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	r1ts
zinstall_lib.get_outputsN)r!r!rr!)
Ú__name__Ú
__module__Ú__qualname__Ú__doc__r
rrÚstaticmethodrrrr-r1rrrr	rs

r)	rrÚ	itertoolsrrZdistutils.command.install_libZcommandrr,rrrr	Ú<module>s
Back to Directory File Manager