Server : LiteSpeed
System : Linux server51.dnsbootclub.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
User : nandedex ( 1060)
PHP Version : 8.1.33
Disable Function : NONE
Directory :  /opt/cppython/lib/python3.8/site-packages/setuptools/command/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]


Current File : //opt/cppython/lib/python3.8/site-packages/setuptools/command/__pycache__/setopt.cpython-38.pyc
U

E��g��@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)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�F/opt/cppython/lib/python3.8/site-packages/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

+'

F1le Man4ger