o
XaiÞ ã @ sˆ d dl mZ d dlmZ d dlmZ d dlZd dlZd dlZd dlm Z g d¢Z
ddd „Zddd„ZG d
d„ de ƒZ
G dd„ de
ƒZdS )é )Úconvert_path)Úlog)ÚDistutilsOptionErrorN)ÚCommand)Úconfig_fileÚedit_configÚoption_baseÚsetoptÚlocalc C sd | dkrdS | dkrt j t j tj¡d¡S | dkr-t jdkr!dp"d}t j td | ƒ¡S t d
| ƒ‚)zGet the filename of the distutils, local, global, or per-user config
`kind` must be one of "local", "global", or "user"
r
z 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Údot© r ú’/builddir/build/BUILDROOT/alt-python310-setuptools-58.3.0-4.el8.x86_64/opt/alt/python310/lib/python3.10/site-packages/setuptools/command/setopt.pyr
s ÿÿr Fc C sH t d| ¡ t ¡ }dd„ |_| | g¡ | ¡ D ]c\}}|du r.t d|| ¡ | |¡ q| |¡s?t d|| ¡ |
|¡ | ¡ D ]8\}}|du rkt d||| ¡ | ||¡ | |¡sjt d|| ¡ | |¡ qCt d |||| ¡ |
|||¡ qCqt d
| ¡ |s¢t| dƒ}| |¡ W d ƒ dS 1 s›w Y dS dS )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 s | S ©Nr )Úxr r r Ú