a ¨5€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Ú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úJ/opt/alt/python39/lib/python3.9/site-packages/setuptools/command/setopt.pyr sÿÿrFc CsFt d|¡t ¡}dd„|_| |g¡| ¡D]Æ\}}|dur\t d||¡| |¡q2|  |¡s~t d||¡|  |¡| ¡D]p\}}|durÖt d|||¡|  ||¡|  |¡söt d||¡| |¡q†t d ||||¡|  |||¡q†q2t d |¡|sBt|d ƒ}| |¡Wdƒn1s80YdS) 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Ú*ózedit_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Ú configparserZRawConfigParserZ optionxformÚreadÚitemsÚinfoZremove_sectionZ has_sectionZ add_sectionZ remove_optionÚoptionsÚsetÚopenÚwrite) ÚfilenameZsettingsÚdry_runZoptsZsectionr'Ú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=rIr-rrJrGr6rrrr=ˆs  zsetopt.finalize_optionscCs*t|j|j|j dd¡|jii|jƒdS)Nú-Ú_)rr+rIr-ÚreplacerJr,r6rrrÚruns ÿüz setopt.runN) r>r?r@rAÚ descriptionrrBrCr8r=rNrrrrr ssû r )r )F)Zdistutils.utilrrrZdistutils.errorsrrr#Z setuptoolsrÚ__all__rrrr rrrrÚs      ,'