ΰReΜ c @ 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( i N( u Command( u convert_path( u log( u *u config_fileu edit_configu option_baseu setoptu localc 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( u Get the filename of the distutils, local, global, or per-user config `kind` must be one of "local", "global", or "user" u localu setup.cfgu globalu distutils.cfgu useru posixu .u u ~/%spydistutils.cfgu7 config_file() type must be 'local', 'global', or 'user'N( u osu pathu joinu dirnameu distutilsu __file__u nameu expanduseru convert_pathu ValueError( u kindu dot( ( u2 /tmp/pip-k8wh6o-build/setuptools/command/setopt.pyu config_file s c 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 | | s©t | d } | j | | j n d S( uY 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. i ( u ConfigParseru Reading configuration from %su Deleting section [%s] from %su Adding new section [%s] to %su Deleting %s.%s from %su# Deleting empty [%s] section from %su Setting %s.%s to %r in %su Writing %su wN( u setuptools.compatu ConfigParseru logu debugu RawConfigParseru readu itemsu Noneu infou remove_sectionu has_sectionu add_sectionu remove_optionu optionsu setu openu writeu close( u filenameu settingsu dry_runu ConfigParseru optsu sectionu optionsu optionu valueu f( ( u2 /tmp/pip-k8wh6o-build/setuptools/command/setopt.pyu edit_config* s: c B sM | Ee Z d Z d Z d d d g Z d d g Z d d Z d d Z d S( u option_baseu<