U ia»ã@sŒddlmZddlmZddlmZddlZddlZddlZddlm Z dddd gZ dd d„Z dd d„Z Gdd„de ƒZ Gdd „d e ƒ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úq/private/var/folders/k6/_7fsz4ts3b78x3b3xwrxjh_c8s8xv7/T/pip-unpacked-wheel-yl_m2el9/setuptools/command/setopt.pyr s ÿÿFc Cs&t d|¡t ¡}| |g¡| ¡D]Æ\}}|dkrRt d||¡| |¡q(| |¡stt d||¡|  |¡| ¡D]p\}}|dkrÌt d|||¡|  ||¡|  |¡sìt d||¡| |¡q|t d||||¡|  |||¡q|q(t d|¡|s"t |d ƒ}| |¡W5QRXdS) 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Ú configparserÚRawConfigParserÚreadÚitemsÚinfoÚremove_sectionÚ has_sectionÚ add_sectionÚ remove_optionÚoptionsÚsetÚopenÚwrite) ÚfilenameÚsettingsÚdry_runÚoptsÚsectionr(ÚoptionÚvalueÚfrrrr sJ     þ  ÿ þ  c@s2eZdZdZdddgZddgZdd„Zd d „Zd S) rz|js>tdƒ‚dS)Nz%Must specify --command *and* --optionz$Must specify --set-value or --remove)rrBrNr1rrOrLr;rrrrB‡s  zsetopt.finalize_optionscCs*t|j|j|j dd¡|jii|jƒdS)Nú-Ú_)rr,rNr1ÚreplacerOr.r;rrrÚrunŽsÿüz setopt.runN) rCrDrErFÚ descriptionrrGrHr=rBrSrrrrr rsüû )r )F)Údistutils.utilrrrÚdistutils.errorsrrrÚ setuptoolsrÚ__all__rrrr rrrrÚs       +'