B
åÍ²Š·ì›ã @ sŒ d dl mZ d dlmZ d dlmZ d dlZd dlZd dlZd dlm Z dddd gZ
ddd„Zdd
d„ZG dd„ de ƒZ
G dd „ d e
ƒZdS )é )Úconvert_path)Úlog)ÚDistutilsOptionErrorN)ÚCommandÚconfig_fileÚedit_configÚoption_baseÚsetoptÚlocalc C sh | dkrdS | dkr,t j t j tj¡d¡S | dkrZt jdkrBdpDd}t j td | ƒ¡S t d
| ƒ‚dS )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'N)
ÚosÚpathÚjoinÚdirnameÚ distutilsÚ__file__ÚnameÚ
expanduserr Ú
ValueError)ÚkindÚdot© r ú/builddir/build/BUILDROOT/alt-python37-setuptools-58.3.0-4.el9.x86_64/opt/alt/python37/lib/python3.7/site-packages/setuptools/command/setopt.pyr
s Fc C s8 t d| ¡ t ¡ }dd„ |_| | g¡ xÖ| ¡ D ]Ê\}}|dkr^t d|| ¡ | |¡ q4| |¡s€t d|| ¡ |
|¡ x|| ¡ D ]p\}}|dkrÚt d||| ¡ | ||¡ | |¡sút d|| ¡ | |¡ qŠt d |||| ¡ |
|||¡ qŠW q4W t d
| ¡ |s4t| dƒ}| |¡ W dQ R X 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 Ú