| Server IP : 127.0.0.1 / Your IP : 216.73.216.109 Web Server : Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10 System : Windows NT DESKTOP-E5T4RUN 10.0 build 19045 (Windows 10) AMD64 User : SERVERWEB ( 0) PHP Version : 8.1.10 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/cygwin64/lib/python3.9/site-packages/sphinx/__pycache__/ |
Upload File : |
a
�ab�
� @ s� d Z ddlZddlmZ ddlmZmZmZmZ ddlm Z ddl
mZmZm
Z
ddlmZ ddlmZmZ e�e�Zg d �ZG d
d� d�ZdS )z�
sphinx.project
~~~~~~~~~~~~~~
Utility function and classes for Sphinx projects.
:copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
� N)�glob)�Dict�List�Optional�Set)�__)�get_matching_files�logging�path_stabilize)�compile_matchers)�SEP�relpath)z**/_sourcesz.#*z**/.#*z
*.lproj/**c @ s~ e Zd ZdZeeeef dd�dd�Zd dd�dd�Zg fee e e d �d
d�Z
eee d�d
d�Zdee
ed�dd�ZdS )�Projectz;A project is the source code set of the Sphinx document(s).N)�srcdir�
source_suffix�returnc C s || _ || _t� | _d S )N)r r �set�docnames)�selfr r � r �2/usr/lib/python3.9/site-packages/sphinx/project.py�__init__ s zProject.__init__)�otherr c C s |j | _ dS )z!Take over a result of last build.N)r )r r r r r �restore% s zProject.restore)�
exclude_pathsr c s� t � � _t|t �}t� j|�D ]�}� �|�}|r |� jv r�tj� � j|�d }� fdd�t
|�D �}tjt
d�||� �|�dd� q t�tj� � j|�tj�r�� j�|� q tjt
d�|d� q � jS ) zbFind all document files in the source directory and put them in
:attr:`docnames`.
z.*c s g | ]}t |� j��qS r )r
r )�.0�f�r r r �
<listcomp>4 � z$Project.discover.<locals>.<listcomp>zDmultiple files found for the document "%s": %r
Use %r for the build.T)�oncezdocument not readable. Ignored.)�location)r r r �
EXCLUDE_PATHSr r �path2doc�os�path�joinr �loggerZwarningr �doc2path�access�R_OK�add)r r Zexcludes�filename�docname�pattern�filesr r r �discover) s
�zProject.discover)r, r c C sP |� | j�rt|| j�}| jD ],}|�|�rt|�}|dt|� � S qdS )z�Return the docname for the filename if the file is a document.
*filename* should be absolute or relative to the source directory.
N)�
startswithr r
r �endswithr
�len)r r, �suffixr r r r# ? s
zProject.path2docT)r- �basedirr c C sf |� ttjj�}tj�| j|�}| jD ]}tj�|| �r& qNq&t | j�d }|rZ|| S || S dS )z�Return the filename for the document name.
If *basedir* is True, return as an absolute path.
Else, return as a relative path to the source directory.
r N)
�replacer r$ r% �sepr&