a (šReÞã@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ú/builddir/build/BUILDROOT/alt-python39-setuptools-58.3.0-2.el8.x86_64/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Ú 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@      þ  ÿ þ  rc@s0eZdZdZgd¢ZddgZdd„Zdd„Zd S) rzr1Úlenr)r@Ú filenamesrrrÚfinalize_optionsas   þzoption_base.finalize_optionsN)Ú__name__Ú __module__Ú __qualname__Ú__doc__Ú user_optionsÚboolean_optionsrArFrrrrrLs  ÿrc@sFeZdZdZdZgd¢ejZejdgZdd„Zdd„Z d d „Z d S) 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 |¡|jdus|jdur&tdƒ‚|jdur>|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 )r )F)Údistutils.utilrrrÚdistutils.errorsrrr#Ú setuptoolsrÚ__all__rrrr rrrrÚs      ,'