3 K”ReÝã@s�ddlmZddlmZddlmZddlZddlZddlmZddl m Z ddd d gZ dd d„Z ddd„Z Gdd „d e ƒZGdd „d eƒZdS)é)Ú convert_path)Úlog)ÚDistutilsOptionErrorN)Ú configparser)ÚCommandÚ config_fileÚ edit_configÚ option_baseÚsetoptÚlocalcCsh|dkr dS|dkr,tjjtjjtjƒdƒS|dkrZtjdkrBdpDd}tjjtd |ƒƒSt d |ƒ‚d S) z�Get 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-python36-setuptools-38.5.2-7.el8.x86_64/opt/alt/python36/lib/python3.6/site-packages/setuptools/command/setopt.pyrsFc Cs.tjd|ƒtjƒ}|j|gƒxÖ|jƒD]Ê\}}|dkrTtjd||ƒ|j|ƒq*|j|ƒsvtjd||ƒ|j |ƒx||jƒD]p\}}|dkrÐtjd|||ƒ|j ||ƒ|j |ƒsðtjd||ƒ|j|ƒq€tjd||||ƒ|j |||ƒq€Wq*Wtjd|ƒ|�s*t |d ƒ�}|j|ƒ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 %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ÚdebugrÚ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!s8            c@s2eZdZdZdddgZddgZd d „Zd d„ZdS)r zÚ filenamesrrrÚfinalize_optionsas   zoption_base.finalize_optionsN)r4r5r6)r7r8r9)r:r3r;)Ú__name__Ú __module__Ú __qualname__Ú__doc__Ú user_optionsÚboolean_optionsr?rDrrrrr Lsc@sJeZdZdZdZddddgejZejd gZdd„Zdd„Z dd„Z dS)r z#Save command-line options to a filez1set an option in setup.cfg or another config fileúcommand=Úcúcommand to set an option forúoption=Úoú option to setú set-value=Úsúvalue of the optionÚremoveÚrúremove (unset) the valuecCs&tj|ƒd|_d|_d|_d|_dS)N)r r?Úcommandr1Ú set_valuerT)r>rrrr?�s  zsetopt.initialize_optionscCsDtj|ƒ|jdks|jdkr&tdƒ‚|jdkr@|j r@tdƒ‚dS)Nz%Must specify --command *and* --optionz$Must specify --set-value or --remove)r rDrWr1rrXrT)r>rrrrDˆs  zsetopt.finalize_optionscCs*t|j|j|jjddƒ|jii|jƒdS)Nú-Ú_)rr,rWr1ÚreplacerXr.)r>rrrÚrun�sz setopt.runN)rKrLrM)rNrOrP)rQrRrS)rTrUrV) rErFrGrHÚ descriptionr rIrJr?rDr\rrrrr ss )r )F)Údistutils.utilrrrÚdistutils.errorsrrZsetuptools.extern.six.movesrÚ setuptoolsrÚ__all__rrr r rrrrÚs        +'