| Server IP : 127.0.0.1 / Your IP : 216.73.216.109 Web Server : Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10 System : Windows NT DESKTOP-E5T4RUN 10.0 build 19045 (Windows 10) AMD64 User : SERVERWEB ( 0) PHP Version : 8.1.10 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/cygwin64/lib/python3.7/site-packages/setuptools/command/__pycache__/ |
Upload File : |
B
�a� � @ s� d dl mZ d dlmZ d dlmZ d dlZd dlZd dlZd dlm Z dddd gZ
ddd�Zdd
d�ZG dd� de �Z
G dd � d e
�ZdS )� )�convert_path)�log)�DistutilsOptionErrorN)�Command�config_file�edit_config�option_base�setopt�localc C sh | dkrdS | dkr,t j�t j�tj�d�S | dkrZt jdkrBdpDd}t j�td | ��S t 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.7/site-packages/setuptools/command/setopt.pyr
s Fc C s8 t �d| � t�� }dd� |_|�| g� x�|�� D ]�\}}|dkr^t �d|| � |�|� q4|� |�s�t �d|| � |�
|� x||�� D ]p\}}|dkr�t �d||| � |�||� |�|�s�t �d|| � |�|� q�t �d |||| � |�
|||� q�W q4W t �d
| � |�s4t| d��}|�|� W dQ R X dS )aY Edit 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 %sc S s | S )Nr )�xr r r �<lambda>* � zedit_config.<locals>.<lambda>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�configparserZRawConfigParserZoptionxform�read�items�infoZremove_sectionZhas_sectionZadd_sectionZ
remove_option�options�set�open�write) �filenameZsettings�dry_runZopts�sectionr&