File: //usr/lib/python3/dist-packages/trac/__pycache__/dist.cpython-310.pyc
o
�k�`�a �
@ s� d Z ddlmZ ddlZddlZddlZddlmZmZm Z m
Z
mZ ddlm
Z ddlmZ ddlmZ ddlmZ dd lmZ dd
lmZ dd� ZG d
d� de�Zz�ddlmZ ddl m!Z! ddl"m#Z#m$Z$m%Z%m&Z& ddl'm(Z( ddl)m*Z* ddl+m,Z, ddiddiddiddiddiddiddiddiddid� Z-dZ.dd� Z/dd� Z0dd � Z1e1Z2G d!d"� d"e�Z3G d#d$� d$e�Z4d%d&� Z5d'd(� Z6d)d*� Z7d+d,� Z8d-d.� Z9d/d0� Z:d1d2� Z;d3d4� Z<W dS e=y� d5d0� Z:d6d2� Z;d7d4� Z<Y dS w )8a: Extra commands for setup.py.
We provide a few extra command classes in `l10n_cmdclass` for
localization tasks. We also modify the standard commands
`distutils.command.build` and `setuptools.command.install_lib` classes
in order to call the l10n commands for compiling catalogs at the right
time during install.
� )�
HTMLParserN)�generate_tokens�COMMENT�NAME�OP�STRING)�
babel_extract)�log)�Command)�build)�DistutilsOptionError)�install_libc C sJ t | t�r t| �nd}|r| d } d�| �� �} |r#| fd|d } | S )z�Transforms an extracted messsage (string or tuple) into one in
which the repeated white-space has been simplified to a single
space.
r � �N� )�
isinstance�tuple�len�join�split)�message� tuple_len� r �+/usr/lib/python3/dist-packages/trac/dist.py�simplify_message'