MRe @ s d d l Z d d l Z d d l m Z d d l m Z d d l m Z d d l Td 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) N)Command)convert_path)log)*config_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 4/tmp/pip-l4uy7dan-build/setuptools/command/setopt.pyr
s Fc
C s d d l m } t j d | | j } | j | g x+| j D]\ } } | d k r t j d | | | j | qI | j | s t j d | | | j
| n x | j D] \ } } | d k r6t j d | | | | j | | | j | sbt j d | | | j | qbq t j d | | | | | j
| | | q WqI Wt j d
| | st | d } | j | | j n d 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.
r )ConfigParserzReading 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)Zsetuptools.compatr r debugRawConfigParserreaditemsinforemove_sectionhas_sectionadd_section
remove_optionoptionssetopenwriteclose)
filenameZsettingsdry_runr optssectionr( optionvaluefr r r r * s:
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