Re @ s d d l m Z d d l m Z d d l m Z d d l Z d d l Z d d l m Z d d l m
Z
d d d d
g Z d d d Z d
d d Z
Gd d d e
Z Gd d
d
e Z d S) )convert_path)log)DistutilsOptionErrorN)configparser)Commandconfig_fileedit_configoption_basesetoptlocalc C s | d k r d S| d k r> t j j t j j t j d S| d k r t j d k r_ d pb d } t j j t d | St d
| d S)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-python35-setuptools-36.3.0-4.el8.x86_64/opt/alt/python35/lib/python3.5/site-packages/setuptools/command/setopt.pyr s Fc C s t j d | t j } | j | g x%| j D]\ } } | d k rt t j d | | | j | q9 | j | s t j d | | | j | x | j D] \ } } | d k r t j d | | | | j
| | | j | sLt j d | | | j | q t j d | | | | | j | | | q Wq9 Wt j d | | st
| d } | j | Wd QRXd S)
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 @ sI e Z d Z d Z d d d g Z d d g Z d d Z d
d Z d S)r z