a
ˆåÏh» ã @ sˆ d dl mZ d dlmZ d dlmZ d dlZd dlZd dlZd dlm Z g d¢Z
ddd „Zddd„ZG d
d„ de ƒZ
G dd„ de
ƒ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 ú=/usr/lib/python3.9/site-packages/setuptools/command/setopt.pyr
s ÿÿr Fc C s< t d| ¡ t ¡ }| | g¡ | ¡ D ]Æ\}}|du rRt d|| ¡ | |¡ q(| |¡stt d|| ¡ | |¡ | ¡ D ]p\}}|du rÌt d||| ¡ |
||¡ | |¡sìt d|| ¡ | |¡ q|t d|||| ¡ | |||¡ q|q(t d| ¡ |s8t
| d ƒ}| |¡ W d ƒ n1 s.0 Y 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 %sÚw)r ÚdebugÚconfigparserZRawConfigParserÚreadÚitemsÚinfoZremove_sectionZhas_sectionZadd_sectionZ
remove_optionÚoptionsÚsetÚopenÚwrite) ÚfilenameZsettingsÚdry_runZoptsÚsectionr# ÚoptionÚvalueÚfr r r r s>
þ
ÿþr c @ s0 e Zd ZdZg d¢ZddgZdd„ Zdd„ Zd S )
r z