Viewing File: /opt/alt/python35/lib/python3.5/site-packages/pbr/hooks/__pycache__/files.cpython-35.opt-1.pyc



•Vaã@smddlZddlZddlmZddlmZdd„Zdd„ZGdd	„d	ejƒZ	dS)
éN)Úfind_package)ÚbasecCs4d}tjjtjjtjdƒƒr0d}|S)Nz	share/manZman)ÚosÚpathÚexistsÚjoinÚsysÚprefix)Úmanpath©rú	/files.pyÚget_manpaths$r
cCstjjtƒd|ƒS)Nzman%s)rrrr
)ÚsectionrrrÚget_man_section"srcsveZdZdZ‡fdd†Z‡fdd†Zdd„Zdd	„Zd
d„Zdd
„Z	dd„Z
‡S)ÚFilesConfigÚfilescs;tt|ƒj|ƒ||_|jjddƒ|_dS)NÚ
data_filesÚ)ÚsuperrÚ__init__ÚnameÚconfigÚgetr)Úselfrr)Ú	__class__rrr*s	zFilesConfig.__init__cs'|j|jd<tt|ƒjƒdS)Nr)rrrrÚsave)r)rrrr/szFilesConfig.savecs&g}x|jjdƒD]ó}|jƒjdƒrÿd|krÿ|jdƒ\}}|jƒdd…}|jƒ}|jtjjƒsœ|tjj7}xmtj|ƒD]L\‰}}|j	dˆj
||ƒƒ|j‡fdd†|Dƒƒq¬Wq|j	|ƒqWdj|ƒ|_dS)	NÚ
Ú*ú=éz%s = cs)g|]}dtjjˆ|ƒ‘qS)z %s)rrr)Ú.0Úf)Údirpathrrú
<listcomp>@s	z,FilesConfig.expand_globs.<locals>.<listcomp>éÿÿÿÿ)
rÚsplitÚrstripÚendswithÚstriprrÚsepÚwalkÚappendÚreplaceÚextendr)rÚfinishedÚlineÚtargetZsource_globZ
source_prefixÚdirnamesÚfnamesr)r"rÚexpand_globs3s!!zFilesConfig.expand_globscCsd|j|f|_dS)Nz%s
%s =)r)rZman_pathrrrÚadd_man_pathFszFilesConfig.add_man_pathcCsd|j|f|_dS)Nz%s
  %s)r)rZman_pagerrrÚadd_man_pageIszFilesConfig.add_man_pagecCsstƒ}|jd}xV|jƒD]H}|jƒd}|j|tƒƒ}|j|jƒƒ|||<q#W|S)NÚmanpagesrr$)ÚdictÚ
pbr_configr%r(rÚlistr+)rÚman_sectionsr6ZmanpageZsection_numberrrrrÚget_man_sectionsLs	
zFilesConfig.get_man_sectionsc	Cs|jjd|jƒjƒ}g}xK|jdƒD]:}tjj|jƒƒr4|jt	j
|jƒƒƒq4Wdj|ƒ|jd<|jƒd|j
kr|jƒ}xQ|jƒD]C\}}t|ƒ}|j|ƒx|D]}|j|ƒqæWqºWdS)NÚpackagesrr6)rrrr(r%rrÚisdirr+rZsmart_find_packagesrr3r8r;Úitemsrr4r5)	rr<ZexpandedZpkgr:rZpagesr
ZpagerrrÚhookVs 


zFilesConfig.hook)Ú__name__Ú
__module__Ú__qualname__rrrr3r4r5r;r?rr)rrr&s
r)
rrZpbrrZ	pbr.hooksrr
rZ
BaseConfigrrrrrÚ<module>s
Back to Directory File Manager