U
    \Sh                     @  s   d dl mZ d dlmZ zJd dlmZ zd dlmZmZm	Z	 W n  e
k
r^   e Z Z	ZY nX W n, e
k
r   d dlmZ d dlmZ	 Y nX dd ZG dd	 d	ejeZG d
d dejeZG dd dejeZG dd dejeZeeeedZdS )    )annotations)frontend)Command)	BaseErrorOptionError
SetupError)DistutilsSetupErrorc                 C  s"   |dkst t|tstddS )ag  Validate the ``message_extractors`` keyword argument to ``setup()``.

    :param dist: the distutils/setuptools ``Distribution`` object
    :param name: the name of the keyword argument (should always be
                 "message_extractors")
    :param value: the value of the keyword argument
    :raise `DistutilsSetupError`: if the value is not valid
    Zmessage_extractorszDthe value of the "message_extractors" parameter must be a dictionaryN)AssertionError
isinstancedictr   )distnamevalue r   U/root/rtd-docs/venv/lib/python3.8/site-packages/babel/messages/setuptools_frontend.pycheck_message_extractors   s
    	
r   c                   @  s   e Zd ZdZdS )compile_cataloga  Catalog compilation command for use in ``setup.py`` scripts.

    If correctly installed, this command is available to Setuptools-using
    setup scripts automatically. For projects using plain old ``distutils``,
    the command needs to be registered explicitly in ``setup.py``::

        from babel.messages.setuptools_frontend import compile_catalog

        setup(
            ...
            cmdclass = {'compile_catalog': compile_catalog}
        )

    .. versionadded:: 0.9
    N__name__
__module____qualname____doc__r   r   r   r   r   #   s   r   c                   @  s   e Zd ZdZdS )extract_messagesa  Message extraction command for use in ``setup.py`` scripts.

    If correctly installed, this command is available to Setuptools-using
    setup scripts automatically. For projects using plain old ``distutils``,
    the command needs to be registered explicitly in ``setup.py``::

        from babel.messages.setuptools_frontend import extract_messages

        setup(
            ...
            cmdclass = {'extract_messages': extract_messages}
        )
    Nr   r   r   r   r   r   5   s   r   c                   @  s   e Zd ZdZdS )init_cataloga  New catalog initialization command for use in ``setup.py`` scripts.

    If correctly installed, this command is available to Setuptools-using
    setup scripts automatically. For projects using plain old ``distutils``,
    the command needs to be registered explicitly in ``setup.py``::

        from babel.messages.setuptools_frontend import init_catalog

        setup(
            ...
            cmdclass = {'init_catalog': init_catalog}
        )
    Nr   r   r   r   r   r   E   s   r   c                   @  s   e Zd ZdZdS )update_cataloga  Catalog merging command for use in ``setup.py`` scripts.

    If correctly installed, this command is available to Setuptools-using
    setup scripts automatically. For projects using plain old ``distutils``,
    the command needs to be registered explicitly in ``setup.py``::

        from babel.messages.setuptools_frontend import update_catalog

        setup(
            ...
            cmdclass = {'update_catalog': update_catalog}
        )

    .. versionadded:: 0.9
    Nr   r   r   r   r   r   U   s   r   )r   r   r   r   N)
__future__r   Zbabel.messagesr   
setuptoolsr   Zsetuptools.errorsr   r   r   ImportError	Exceptiondistutils.cmddistutils.errorsr   r   ZCompileCatalogr   ZExtractMessagesr   ZInitCatalogr   ZUpdateCatalogr   ZCOMMANDSr   r   r   r   <module>   s(   