Viewing File: /usr/lib/python2.7/site-packages/setuptools/command/setopt.pyo

ó
b-äQc@s¬ddlZddlZddlmZddlmZddlmZddlTdddd	gZd
d„Z	e
d„Zdefd
„ƒYZd	efd„ƒYZ
dS(iÿÿÿÿN(tCommand(tconvert_path(tlog(t*tconfig_filetedit_configtoption_basetsetopttlocalcCs’|dkrdS|dkr>tjjtjjtjƒdƒS|dkrtjdkr_dpbd}tjjtd	|ƒƒSt	d
|ƒ‚dS(sGet the filename of the distutils, local, global, or per-user config

    `kind` must be one of "local", "global", or "user"
    Rs	setup.cfgtglobals
distutils.cfgtusertposixt.ts~/%spydistutils.cfgs7config_file() type must be 'local', 'global', or 'user'N(
tostpathtjointdirnamet	distutilst__file__tnamet
expanduserRt
ValueError(tkindtdot((s=/usr/lib/python2.7/site-packages/setuptools/command/setopt.pyR
s	c
Cs­ddlm}tjd|ƒ|jƒ}|j|gƒx+|jƒD]\}}|dkr„tjd||ƒ|j	|ƒqI|j
|ƒs¶tjd||ƒ|j|ƒnx­|jƒD]Ÿ\}}|dkr6tjd|||ƒ|j||ƒ|j
|ƒsbtjd||ƒ|j	|ƒqbqÃtjd||||ƒ|j|||ƒqÃWqIWtjd	|ƒ|s©t|d
ƒ}	|j|	ƒ|	jƒndS(sYEdit 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.
    iÿÿÿÿ(tConfigParsersReading configuration from %ssDeleting section [%s] from %ssAdding new section [%s] to %ssDeleting %s.%s from %ss#Deleting empty [%s] section from %ssSetting %s.%s to %r in %ss
Writing %stwN(tsetuptools.compatRRtdebugtRawConfigParsertreadtitemstNonetinfotremove_sectionthas_sectiontadd_sectiont
remove_optiontoptionstsettopentwritetclose(
tfilenametsettingstdry_runRtoptstsectionR&toptiontvaluetf((s=/usr/lib/python2.7/site-packages/setuptools/command/setopt.pyR*s:	
	

cBs;eZdZdd
dgZddgZd
„Zd„ZRS(s<Abstract base class for commands that mess with config filess
global-configtgs0save options to the site-wide distutils.cfg filesuser-configtus7save options to the current user's pydistutils.cfg files	filename=R2s-configuration file to use (default=setup.cfg)cCsd|_d|_d|_dS(N(R t
global_configtuser_configR+(tself((s=/usr/lib/python2.7/site-packages/setuptools/command/setopt.pytinitialize_optionscs		cCs¶g}|jr%|jtdƒƒn|jrD|jtdƒƒn|jdk	rf|j|jƒn|s‚|jtdƒƒnt|ƒdkr¦td|ƒ‚n|\|_dS(NR	R
Ris/Must specify only one configuration file option(R5tappendRR6R+R tlentDistutilsOptionError(R7t	filenames((s=/usr/lib/python2.7/site-packages/setuptools/command/setopt.pytfinalize_optionshs		(s
global-configR3s0save options to the site-wide distutils.cfg file(suser-configR4s7save options to the current user's pydistutils.cfg file(s	filename=R2s-configuration file to use (default=setup.cfg)(t__name__t
__module__t__doc__tuser_optionstboolean_optionsR8R=(((s=/usr/lib/python2.7/site-packages/setuptools/command/setopt.pyRSs		cBsXeZdZdZddddgejZejdgZd„Zd„Zd„Z	RS(s#Save command-line options to a files1set an option in setup.cfg or another config filescommand=tcscommand to set an option forsoption=tos
option to sets
set-value=tssvalue of the optiontremovetrsremove (unset) the valuecCs5tj|ƒd|_d|_d|_d|_dS(N(RR8R tcommandR0t	set_valueRF(R7((s=/usr/lib/python2.7/site-packages/setuptools/command/setopt.pyR8Šs

			cCsftj|ƒ|jdks+|jdkr:tdƒ‚n|jdkrb|jrbtdƒ‚ndS(Ns%Must specify --command *and* --options$Must specify --set-value or --remove(RR=RHR R0R;RIRF(R7((s=/usr/lib/python2.7/site-packages/setuptools/command/setopt.pyR=‘s

cCs=t|jii|j|jjddƒ6|j6|jƒdS(Nt-t_(RR+RIR0treplaceRHR-(R7((s=/usr/lib/python2.7/site-packages/setuptools/command/setopt.pytrun˜s	#(scommand=RCscommand to set an option for(soption=RDs
option to set(s
set-value=REsvalue of the option(sremoveRGsremove (unset) the value(
R>R?R@tdescriptionRRARBR8R=RM(((s=/usr/lib/python2.7/site-packages/setuptools/command/setopt.pyR|s
		(RRt
setuptoolsRtdistutils.utilRRtdistutils.errorst__all__RtFalseRRR(((s=/usr/lib/python2.7/site-packages/setuptools/command/setopt.pyt<module>s
 ))
Back to Directory File Manager