Your IP : 216.73.216.213


Current Path : /opt/alt/python37/lib/python3.7/site-packages/pbr/hooks/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib/python3.7/site-packages/pbr/hooks/__pycache__/files.cpython-37.opt-1.pyc

B

�Va�@sNddlZddlZddlmZddlmZdd�Zdd�ZGdd	�d	ej�Z	dS)
�N)�find_package)�basecCs$d}tj�tj�tjd��r d}|S)Nz	share/manZman)�os�path�exists�join�sys�prefix)�manpath�r�@/opt/alt/python37/lib/python3.7/site-packages/pbr/hooks/files.py�get_manpathsr
cCstj�t�d|�S)Nzman%s)rrrr
)�sectionrrr�get_man_section"srcsTeZdZdZ�fdd�Z�fdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
�ZS)�FilesConfig�filescs*tt|��|�||_|j�dd�|_dS)N�
data_files�)�superr�__init__�name�config�getr)�selfrr)�	__class__rrr*szFilesConfig.__init__cs|j|jd<tt|���dS)Nr)rrrr�save)r)rrrr/szFilesConfig.savec	s�g}x�|j�d�D]�}|���d�r�d|kr�|�d�\}}|��dd�}|��}|�tjj�sl|tjj7}xRt�|�D]8\�}}|�	d��
||��|��fdd�|D��qxWq|�	|�qWd�|�|_dS)N�
�*�=���z%s = csg|]}dtj��|��qS)z %s)rrr)�.0�f)�dirpathrr�
<listcomp>@sz,FilesConfig.expand_globs.<locals>.<listcomp>)
r�split�rstrip�endswith�striprr�sep�walk�append�replace�extendr)r�finished�line�targetZsource_globZ
source_prefixZdirnames�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_pagecCsVt�}|jd}x@|��D]4}|��d}|�|t��}|�|���|||<qW|S)N�manpagesr)�dict�
pbr_configr$r'r�listr*)r�man_sectionsr4ZmanpageZsection_numberrrrr�get_man_sectionsLs
zFilesConfig.get_man_sectionsc	Cs�|j�d|j���}g}x6|�d�D](}tj�|���r$|�t	�
|����q$Wd�|�|jd<|��d|j
kr�|��}x>|��D]2\}}t|�}|�|�x|D]}|�|�q�Wq�WdS)N�packagesrr4)rrrr'r$rr�isdirr*rZsmart_find_packagesrr1r6r9�itemsrr2r3)	rr:ZexpandedZpkgr8rZpagesr
Zpagerrr�hookVs


zFilesConfig.hook)�__name__�
__module__�__qualname__rrrr1r2r3r9r=�
__classcell__rr)rrr&s
r)
rrZpbrrZ	pbr.hooksrr
rZ
BaseConfigrrrrr�<module>s