o
    f'ha&  ã                   @   sÌ   d Z ddlZddlmZ dZdZ	 G dd„ deddƒƒZedd	d
dddd�Z	 dZ	 G dd„ de	ƒZ
G dd„ de
ƒZG dd„ deƒZG dd„ dƒZG dd„ deeƒZddlZdZer`dd„ ZdS dd„ ZdS )a]  
This is the Docutils (Python Documentation Utilities) package.

Package Structure
=================

Modules:

- __init__.py: Contains component base classes, exception classes, and
  Docutils version information.

- core.py: Contains the ``Publisher`` class and ``publish_*()`` convenience
  functions.

- frontend.py: Runtime settings (command-line interface, configuration files)
  processing, for Docutils front-ends.

- io.py: Provides a uniform API for low-level input and output.

- nodes.py: Docutils document tree (doctree) node class library.

- statemachine.py: A finite state machine specialized for
  regular-expression-based text filters.

Subpackages:

- languages: Language-specific mappings of terms.

- parsers: Syntax-specific input parser modules or packages.

- readers: Context-specific input handlers which understand the data
  source and manage a parser.

- transforms: Modules used by readers and writers to modify DPS
  doctrees.

- utils: Contains the ``Reporter`` system warning class and miscellaneous
  utilities used by readers, writers, and transforms.

  utils/urischemes.py: Contains a complete mapping of known URI addressing
  scheme names to descriptions.

- utils/math: Contains functions for conversion of mathematical notation
  between different formats (LaTeX, MathML, text, ...).

- writers: Format-specific output translators.
é    N)Ú
namedtupleÚreStructuredTextz0.17.1c                       sB   e Zd Z		d‡ fdd„	Zdd„ Zdd	„ Zd
d„ Zdd„ Z‡  ZS )ÚVersionInfor   ÚfinalTc              	      sZ   d}||vrt d|f ƒ‚|dkr|st dƒ‚|dkrt dƒ‚tt| ƒ | ||||||¡S )N)ÚalphaÚbetaÚ	candidater   zreleaselevel must be one of %r.r   z{releaselevel "final" must not be used with development versions (leads to wrong version ordering of the related __version__r   z%"serial" must be 0 for final releases)Ú
ValueErrorÚsuperr   Ú__new__)ÚclsÚmajorÚminorÚmicroÚreleaselevelÚserialÚreleaseÚreleaselevels©Ú	__class__© ú3/usr/lib/python3/dist-packages/docutils/__init__.pyr   K   s   ÿÿzVersionInfo.__new__c                 C   ó   t |tƒr	t|Ž }t | |¡S ©N)Ú
isinstanceÚtupler   Ú__lt__©ÚselfÚotherr   r   r   r   \   ó   
zVersionInfo.__lt__c                 C   r   r   )r   r   r   Ú__gt__r   r   r   r   r!   a   r    zVersionInfo.__gt__c                 C   r   r   )r   r   r   Ú__le__r   r   r   r   r"   f   r    zVersionInfo.__le__c                 C   r   r   )r   r   r   Ú__ge__r   r   r   r   r#   k   r    zVersionInfo.__ge__)r   r   r   r   r   T)	Ú__name__Ú
__module__Ú__qualname__r   r   r!   r"   r#   Ú__classcell__r   r   r   r   r   H   s    ÿr   z-major minor micro releaselevel serial releaseé   é   r   T)r   r   r   r   r   r   r   c                   @   ó   e Zd ZdS )ÚApplicationErrorN©r$   r%   r&   r   r   r   r   r+   ‚   ó    r+   c                   @   r*   )Ú	DataErrorNr,   r   r   r   r   r.   „   r-   r.   c                   @   s2   e Zd ZdZdZ	 dZ	 dZ	 dZ	 dZ	 dZ	dS )ÚSettingsSpecz€
    Runtime setting specification base class.

    SettingsSpec subclass objects used by `docutils.frontend.OptionParser`.
    r   N)
r$   r%   r&   Ú__doc__Úsettings_specÚsettings_defaultsÚsettings_default_overridesÚrelative_path_settingsÚconfig_sectionÚconfig_section_dependenciesr   r   r   r   r/   ‡   s    &r/   c                   @   s    e Zd ZdZdd„ ZdZdZdS )ÚTransformSpecz„
    Runtime transform specification base class.

    TransformSpec subclass objects used by `docutils.transforms.Transformer`.
    c                 C   s,   | j dkrddl}| dt¡ t| j ƒS g S )z;Transforms required by this class.  Override in subclasses.r   r   NzMdefault_transforms attribute deprecated.
Use get_transforms() method instead.)Údefault_transformsÚwarningsÚwarnÚDeprecationWarningÚlist)r   r9   r   r   r   Úget_transformsØ   s   
þ
zTransformSpec.get_transformsr   N)r$   r%   r&   r0   r=   r8   Úunknown_reference_resolversr   r   r   r   r7   Ð   s    r7   c                   @   s$   e Zd ZdZdZ	 dZ	 dd„ ZdS )Ú	Componentz#Base class for Docutils components.Nr   c                 C   s
   || j v S )z¼
        Is `format` supported by this component?

        To be used by transforms to ask the dependent component if it supports
        a certain input context or output format.
        )Ú	supported)r   Úformatr   r   r   Úsupports	  s   
zComponent.supports)r$   r%   r&   r0   Úcomponent_typer@   rB   r   r   r   r   r?   þ   s    r?   é
   c                 C   sZ   t j | ¡}t j t j t¡d¡}|  |¡sJ d| |f ƒ‚|t|ƒd … }t j d|¡S )NÚ z%r doesn't start with %rz/usr/share/docutils/)ÚosÚpathÚdirnameÚjoinÚ__file__Ú
startswithÚlen)rG   rH   ÚprefixÚsuffixr   r   r   Ú_datadir  s
   rO   c                 C   s   t j | ¡S r   )rF   rG   rH   )rG   r   r   r   rO     s   )r0   ÚsysÚcollectionsr   Ú__docformat__Ú__version__r   Ú__version_info__Ú__version_details__Ú	Exceptionr+   r.   Úobjectr/   r7   r?   rF   Ú_debian_packagerO   r   r   r   r   Ú<module>   s<   0ÿ(ù	I.