B ‘–ReÞã@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ú/builddir/build/BUILDROOT/alt-python37-setuptools-58.3.0-4.el8.x86_64/opt/alt/python37/lib/python3.7/site-packages/setuptools/command/setopt.pyr sFc Cs8t d|¡t ¡}dd„|_| |g¡xÖ| ¡D]Ê\}}|dkr^t d||¡| |¡q4|  |¡s€t d||¡|  |¡x|| ¡D]p\}}|dkrÚt d|||¡|  ||¡|  |¡sút d||¡| |¡qŠt d ||||¡|  |||¡qŠWq4Wt d |¡|s4t|d ƒ}| |¡WdQRXdS) 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Ú 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 s:             c@s2eZdZdZdddgZddgZdd„Zd d „Zd S) rz|js>tdƒ‚dS)Nz%Must specify --command *and* --optionz$Must specify --set-value or --remove)rrBrNr5rrOrL)r<rrrrBˆs  zsetopt.finalize_optionscCs*t|j|j|j dd¡|jii|jƒdS)Nú-Ú_)rr0rNr5ÚreplacerOr2)r<rrrÚrunsz setopt.runN) rCrDrErFÚ descriptionrrGrHr=rBrSrrrrr ss )r )F)Údistutils.utilrrrÚdistutils.errorsrrr"Ú setuptoolsrÚ__all__rrrr rrrrÚs       ,'