3
ՔRe @ s d dl mZ d dlmZ d dlmZ d dlZd dlZd dlmZ d dl m
Z
ddd d
gZdddZdddZ
G dd d e
ZG dd
d
eZdS ) )convert_path)log)DistutilsOptionErrorN)configparser)Commandconfig_fileedit_configoption_basesetoptlocalc C sh | dkrdS | dkr,t jjt jjtjdS | dkrZt jdkrBdpDd}t jjtd | 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.cfgglobalz
distutils.cfguserposix. z~/%spydistutils.cfgz7config_file() type must be 'local', 'global', or 'user'N)
ospathjoindirname distutils__file__name
expanduserr
ValueError)kinddot r /builddir/build/BUILDROOT/alt-python36-setuptools-38.5.2-7.el9.x86_64/opt/alt/python36/lib/python3.6/site-packages/setuptools/command/setopt.pyr s Fc C s. t jd| tj }|j| g x|j D ]\}}|dkrTt jd|| |j| q*|j|svt jd|| |j | x||j D ]p\}}|dkrt jd||| |j
|| |j|st jd|| |j| qt jd|||| |j||| qW q*W t jd| |s*t
| d }|j| 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 %sNzDeleting section [%s] from %szAdding new section [%s] to %szDeleting %s.%s from %sz#Deleting empty [%s] section from %szSetting %s.%s to %r in %sz
Writing %sw)r debugr RawConfigParserreaditemsinforemove_sectionhas_sectionadd_section
remove_optionoptionssetopenwrite) filenamesettingsdry_runoptssectionr( optionvaluefr r r r ! s8
c @ s2 e Zd ZdZdddgZddgZdd Zd
d ZdS )r z