_i? d dl mZ d dlmZ d dlmZ d dlZd dlZd dlZd dlm Z g dZ
d
dZddZ G d d
e Z
G d de
Zy) )convert_path)log)DistutilsOptionErrorN)Command)config_fileedit_configoption_basesetoptc \ | 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
| )zGet the filename of the distutils, local, global, or per-user config
`kind` must be one of "local", "global", or "user"
localz setup.cfgglobalz
distutils.cfguserposix. z~/%spydistutils.cfgz7config_file() type must be 'local', 'global', or 'user')
ospathjoindirname distutils__file__name
expanduserr
ValueError)kinddots /builddir/build/BUILDROOT/alt-python312-setuptools-69.0.2-3.el8.x86_64/opt/alt/python312/lib/python3.12/site-packages/setuptools/command/setopt.pyr r
s
wxww||BGGOOI,>,>?QQv~gg (S.Bww!!,/Ds/J"KLL
NPT
UU 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 | rDt 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