U ë˜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-python38-setuptools-58.3.0-2.el8.x86_64/opt/alt/python38/lib/python3.8/site-packages/setuptools/command/setopt.pyr s ÿÿFc Cs0t d|¡t ¡}dd„|_| |g¡| ¡D]Æ\}}|dkr\t d||¡| |¡q2|  |¡s~t d||¡|  |¡| ¡D]p\}}|dkrÖt d|||¡|  ||¡|  |¡söt d||¡| |¡q†t d ||||¡|  |||¡q†q2t 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 %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 sL      þ  ÿ þ  c@s2eZdZdZdddgZddgZdd„Zd d „Zd S) rzr1Úlenr)r@Ú filenamesrrrÚfinalize_optionsas   þzoption_base.finalize_optionsN)Ú__name__Ú __module__Ú __qualname__Ú__doc__Ú user_optionsÚboolean_optionsrArFrrrrrLsû ÿc@sJeZdZdZdZddddgejZejdgZdd „Zd d „Z d d „Z dS)r z#Save command-line options to a filez1set an option in setup.cfg or another config file)zcommand=Úczcommand to set an option for)zoption=Úoz option to set)z set-value=Úszvalue of the option)ÚremoveÚrzremove (unset) the valuerPcCs&t |¡d|_d|_d|_d|_dSr)rrAÚcommandr6Ú set_valuerPr?rrrrAs  zsetopt.initialize_optionscCsBt |¡|jdks|jdkr&tdƒ‚|jdkr>|js>tdƒ‚dS)Nz%Must specify --command *and* --optionz$Must specify --set-value or --remove)rrFrRr6rrSrPr?rrrrFˆs  zsetopt.finalize_optionscCs*t|j|j|j dd¡|jii|jƒdS)Nú-Ú_)rr1rRr6ÚreplacerSr3r?rrrÚrunsÿüz setopt.runN) rGrHrIrJÚ descriptionrrKrLrArFrWrrrrr ssüû )r )F)Údistutils.utilrrrÚdistutils.errorsrrr#Ú setuptoolsrÚ__all__rrrr rrrrÚs       ,'