�
_�d? � � � d dl mZ d dlmZ d dlmZ d dlZd dlZd dlZd dlm Z g d�Z
d
d�Zdd�Z G d � d
e � Z
G d� de
� Zy)� )�convert_path)�log)�DistutilsOptionErrorN)�Command)�config_file�edit_config�option_base�setoptc �\ � | dk( ry| dk( rKt j j t j j t j
� d� S | dk( rFt j dk( xr dxs d}t j j t d |z � � S t d
| � �)z�Get the filename of the distutils, local, global, or per-user config
`kind` must be one of "local", "global", or "user"
�localz setup.cfg�globalz
distutils.cfg�user�posix�.� z~/%spydistutils.cfgz7config_file() type must be 'local', 'global', or 'user')
�os�path�join�dirname� distutils�__file__�name�
expanduserr �
ValueError)�kind�dots �;/usr/lib/python3/dist-packages/setuptools/command/setopt.pyr r
s� � �
�w����x���w�w�|�|�B�G�G�O�O�I�,>�,>�?��Q�Q��v�~��g�g�� �(�S�.�B���w�w�!�!�,�/D�s�/J�"K�L�L�
�N�PT�
U�U� c �t � t j d| � t j � }d� |_ |j | g� |j
� D �] \ }}|�)t j d|| � |j |� �2|j |� s(t j d|| � |j |� |j
� D ]� \ }}|�et j d||| � |j ||� |j |� r�Dt j d|| � |j |� �mt j d|||| � |j |||� �� �� t j d | � |s't | d
� 5 }|j |� ddd� yy# 1 sw Y yxY w)aY Edit a configuration file to include `settings`
`settings` is a dictionary of dictionaries or ``None`` values, keyed by
command/section name. A ``None`` value means to delete the entire section,
while a dictionary lists settings to be changed or deleted in that section.
A setting of ``None`` means to delete that setting.
zReading configuration from %sc � � | S �N� )�xs r �<lambda>zedit_config.<locals>.<lambda>& |