o ƒ_¶aÞã@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ÚlocalcCsd|dkrdS|dkrtj tj tj¡d¡S|dkr-tjdkr!dp"d}tj td |ƒ¡St d |ƒ‚) 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') ÚosÚpathÚjoinÚdirnameÚ distutilsÚ__file__ÚnameÚ expanduserrÚ ValueError)ÚkindÚdot©rú;/usr/lib/python3/dist-packages/setuptools/command/setopt.pyr sÿÿrFc CsHt d|¡t ¡}dd„|_| |g¡| ¡D]c\}}|dur.t d||¡| |¡q|  |¡s?t d||¡|  |¡| ¡D]8\}}|durkt d|||¡|  ||¡|  |¡sjt d||¡| |¡qCt d ||||¡|  |||¡qCqt d |¡|s¢t|d ƒ}| |¡WdƒdS1s›wYdSdS) 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 %scSs|S©Nr)ÚxrrrÚ*szedit_config..NzDeleting 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Ú optionxformÚreadÚitemsÚinfoÚremove_sectionÚ has_sectionÚ add_sectionÚ remove_optionÚoptionsÚsetÚopenÚwrite) ÚfilenameÚsettingsÚdry_runÚoptsÚsectionr,ÚoptionÚvalueÚfrrrr sH      þ  ÿ €þð   "ÿÿrc@s0eZdZdZgd¢ZddgZdd„Zdd„Zd S) rzrrrr@s  zsetopt.initialize_optionscCsFt |¡|jdus|jdurtdƒ‚|jdur|js!tdƒ‚dSdS)Nz%Must specify --command *and* --optionz$Must specify --set-value or --remove)rrErQr5rrRrOr>rrrrEˆs ÿzsetopt.finalize_optionscCs*t|j|j|j dd¡|jii|jƒdS)Nú-Ú_)rr0rQr5ÚreplacerRr2r>rrrÚruns ÿüz setopt.runN) rFrGrHrIÚ descriptionrrJrKr@rErVrrrrr ssû  r )r )F)Údistutils.utilrrrÚdistutils.errorsrrr"Ú setuptoolsrÚ__all__rrrr rrrrÚs     ,'