HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //usr/lib/python3.9/site-packages/setuptools/command/__pycache__/setopt.cpython-39.opt-1.pyc
a

>��h��@s�ddlmZddlmZddlmZddlZddlZddlZddlm	Z	gd�Z
ddd	�Zddd�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
|��dS)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�=/usr/lib/python3.9/site-packages/setuptools/command/setopt.pyr
s��rFc		Cs<t�d|�t��}|�|g�|��D]�\}}|durRt�d||�|�|�q(|�|�stt�d||�|�	|�|��D]p\}}|dur�t�d|||�|�
||�|�|�s�t�d||�|�|�q|t�d||||�|�|||�q|q(t�d|�|�s8t
|d	��}|�|�Wd�n1�s.0YdS)
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�configparserZRawConfigParser�read�items�infoZremove_sectionZhas_sectionZadd_sectionZ
remove_option�options�set�open�write)	�filenameZsettings�dry_runZoptsZsectionr#�option�value�frrrr s>

�
��rc@s0eZdZdZgd�ZddgZdd�Zdd�Zd	S)
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=r+z-configuration file to use (default=setup.cfg)r,r.cCsd|_d|_d|_dS�N)�
global_config�user_configr'��selfrrr�initialize_options[szoption_base.initialize_optionscCsvg}|jr|�td��|jr,|�td��|jdurB|�|j�|sT|�td��t|�dkrjtd|��|\|_dS)Nrrr
�z/Must specify only one configuration file option)r1�appendrr2r'�lenr)r4�	filenamesrrr�finalize_options`s
�zoption_base.finalize_optionsN)�__name__�
__module__�__qualname__�__doc__�user_options�boolean_optionsr5r:rrrrrKs
�rc@sFeZdZdZdZgd�ejZejdgZdd�Zdd�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 valuerDcCs&t�|�d|_d|_d|_d|_dSr0)rr5�commandr)�	set_valuerDr3rrrr5�s

zsetopt.initialize_optionscCsBt�|�|jdus|jdur&td��|jdur>|js>td��dS)Nz%Must specify --command *and* --optionz$Must specify --set-value or --remove)rr:rFr)rrGrDr3rrrr:�s

zsetopt.finalize_optionscCs*t|j|j|j�dd�|jii|j�dS)N�-�_)rr'rFr)�replacerGr(r3rrr�run�s��z
setopt.runN)r;r<r=r>�descriptionrr?r@r5r:rKrrrrr	rs�r	)r
)F)Zdistutils.utilrrrZdistutils.errorsrrrZ
setuptoolsr�__all__rrrr	rrrr�<module>s

+'