a [Îdg»ã@sˆddlmZddlmZddlmZddlZddlZddlZddlm Z gd¢Z ddd „Z dd d „Z Gd d„de ƒZ Gdd„de ƒZdS)é)Ú convert_path)Úlog)ÚDistutilsOptionErrorN)ÚCommand)Ú config_fileÚ edit_configÚ option_baseÚsetoptÚlocalcCsh|dkr dS|dkr,tj tj tj¡d¡S|dkrZtjdkrBdpDd}tj td |ƒ¡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.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úC/usr/local/lib/python3.9/site-packages/setuptools/command/setopt.pyr sÿÿrFc Cs<t d|¡t ¡}| |g¡| ¡D]Æ\}}|durRt d||¡| |¡q(| |¡stt d||¡|  |¡| ¡D]p\}}|durÌt d|||¡|  ||¡|  |¡sìt d||¡| |¡q|t d||||¡|  |||¡q|q(t d|¡|s8t |d ƒ}| |¡Wdƒn1s.0YdS) aYEdit 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_sectionZ has_sectionZ add_sectionZ remove_optionÚoptionsÚsetÚopenÚwrite) ÚfilenameZsettingsÚdry_runZoptsÚsectionr#ÚoptionÚvalueÚfrrrr s>     þ  ÿ þ  rc@s0eZdZdZgd¢ZddgZdd„Zdd„Zd S) rz|js>tdƒ‚dS)Nz%Must specify --command *and* --optionz$Must specify --set-value or --remove)rr;rGr*rrHrEr4rrrr;‡s  zsetopt.finalize_optionscCs*t|j|j|j dd¡|jii|jƒdS)Nú-Ú_)rr'rGr*ÚreplacerHr(r4rrrÚrunŽs ÿüz setopt.runN) r<r=r>r?Ú descriptionrr@rAr6r;rLrrrrr rsû r )r )F)Zdistutils.utilrrrZdistutils.errorsrrrZ setuptoolsrÚ__all__rrrr rrrrÚs      +'