https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/sphinx/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/sphinx/__pycache__/project.cpython-310.pyc
o

�$�a�
�@s�dZddlZddlmZddlmZmZmZmZddlm	Z	ddl
mZmZm
Z
ddlmZddlmZmZe�e�Zgd	�ZGd
d�d�ZdS)z�
    sphinx.project
    ~~~~~~~~~~~~~~

    Utility function and classes for Sphinx projects.

    :copyright: Copyright 2007-2021 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�eZdZdZdedeeefddfdd�Zdd	d
�Zgfdeede	efdd
�Z
dedeefdd�Zddede
defdd�ZdS)�Projectz;A project is the source code set of the Sphinx document(s).�srcdir�
source_suffix�returnNcCs||_||_t�|_dS)N)rr�set�docnames)�selfrr�r�0/usr/lib/python3/dist-packages/sphinx/project.py�__init__szProject.__init__�othercCs|j|_dS)z!Take over a result of last build.N)r)rrrrr�restore%szProject.restore�
exclude_pathscs�t��_t|t�}t�j|�D]P}��|�}|r`|�jvrCtj�	�j|�d}�fdd�t
|�D�}tjt
d�||��|�dd�qt�tj�	�j|�tj�rW�j�|�qtjt
d�|d�q�jS)	zbFind all document files in the source directory and put them in
        :attr:`docnames`.
        z.*csg|]}t|�j��qSr)r
r)�.0�f�rrr�
<listcomp>4sz$Project.discover.<locals>.<listcomp>zDmultiple files found for the document "%s": %r
Use %r for the build.T)�oncezdocument not readable. Ignored.)�location)rrr�
EXCLUDE_PATHSrr�path2doc�os�path�joinr�logger�warningr�doc2path�access�R_OK�add)rr�excludes�filename�docname�pattern�filesrrr�discover)s 


��zProject.discoverr-cCsP|�|j�rt||j�}|jD]}|�|�r%t|�}|dt|��SqdS)z�Return the docname for the filename if the file is a document.

        *filename* should be absolute or relative to the source directory.
        N)�
startswithrr
r�endswithr
�len)rr-�suffixrrrr"?s

�zProject.path2docTr.�basedircCsb|�ttjj�}tj�|j|�}|jD]}tj�||�rnqt	|j�d}|r-||S||S)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)
�replacerr#r$�sepr%rr�isfile�list)rr.r6�basenamer5rrrr(Ns
�zProject.doc2path)rrrN)T)�__name__�
__module__�__qualname__�__doc__�strrrrrrr1rr"�boolr(rrrrrs

r)r?r#r�typingrrrr�
sphinx.localer�sphinx.utilrr	r
�sphinx.util.matchingr�sphinx.util.osutilrr
�	getLoggerr<r&r!rrrrr�<module>s



https://t.me/RX1948 - 2025