Viewing File: /opt/alt/python38/lib/python3.8/site-packages/setuptools/command/__pycache__/setopt.cpython-38.pyc

U

+’a»ã@sŒddlmZddlmZddlmZddlZddlZddlZddlm	Z	dddd	gZ
ddd„Zdd
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
|ƒ‚dS)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úA/tmp/pip-install-1bd_1mtk/setuptools/setuptools/command/setopt.pyr
sÿÿFc		Cs&t d|¡t ¡}| |g¡| ¡D]Æ\}}|dkrRt d||¡| |¡q(| |¡stt d||¡| 	|¡| ¡D]p\}}|dkrÌt d|||¡| 
||¡| |¡sìt d||¡| |¡q|t d||||¡| |||¡q|q(t 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 %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ÚdebugÚconfigparserÚ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 sJ

þ
ÿþc@s2eZdZdZdddgZddgZdd„Zd	d
„ZdS)rz<Abstract base class for commands that mess with config files)ú
global-configÚgz0save options to the site-wide distutils.cfg file)úuser-configÚuz7save options to the current user's pydistutils.cfg file)z	filename=r3z-configuration file to use (default=setup.cfg)r4r6cCsd|_d|_d|_dS©N)Ú
global_configÚuser_configr,©ÚselfrrrÚinitialize_options[szoption_base.initialize_optionscCsvg}|jr| tdƒ¡|jr,| tdƒ¡|jdk	rB| |j¡|sT| tdƒ¡t|ƒdkrjtd|ƒ‚|\|_dS)Nrrr
éz/Must specify only one configuration file option)r9Úappendrr:r,Úlenr)r<Ú	filenamesrrrÚfinalize_options`s
þzoption_base.finalize_optionsN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Úuser_optionsÚboolean_optionsr=rBrrrrrKsû
ÿ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 valuerLcCs&t |¡d|_d|_d|_d|_dSr8)rr=Úcommandr1Ú	set_valuerLr;rrrr=€s

zsetopt.initialize_optionscCsBt |¡|jdks|jdkr&tdƒ‚|jdkr>|js>tdƒ‚dS)Nz%Must specify --command *and* --optionz$Must specify --set-value or --remove)rrBrNr1rrOrLr;rrrrB‡s

zsetopt.finalize_optionscCs*t|j|j|j dd¡|jii|jƒdS)Nú-Ú_)rr,rNr1ÚreplacerOr.r;rrrÚrunŽsÿüz
setopt.runN)rCrDrErFÚdescriptionrrGrHr=rBrSrrrrr	rsüû)r
)F)Údistutils.utilrrrÚdistutils.errorsrrrÚ
setuptoolsrÚ__all__rrrr	rrrrÚ<module>s

+'
Back to Directory File Manager