| 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.6/site-packages/setuptools/command/__pycache__/ |
Upload File : |
3
��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 jjt jjtj�d�S | dkrZt jdkrBdpDd}t jjtd | ��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.6/setopt.pyr
s Fc C s8 t jd| � tj� }dd� |_|j| g� x�|j� D ]�\}}|dkr^t jd|| � |j|� q4|j |�s�t jd|| � |j
|� x||j� D ]p\}}|dkr�t jd||| � |j||� |j|�s�t jd|| � |j|� q�t jd |||| � |j
|||� q�W q4W t jd
| � |�s4t| d��}|j|� 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>* s 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% �option�value�fr r r r s:
c @ s2 e Zd ZdZdddgZddgZdd� Zd
d� ZdS )r z<Abstract base class for commands that mess with config files�
global-config�g�0save options to the site-wide distutils.cfg file�user-config�u�7save options to the current user's pydistutils.cfg file� filename=r. �-configuration file to use (default=setup.cfg)c C s d | _ d | _d | _d S )N)�
global_config�user_configr) )�selfr r r �initialize_options\ s zoption_base.initialize_optionsc C sv g }| j r|jtd�� | jr,|jtd�� | jd k rB|j| j� |sT|jtd�� t|�dkrjtd|��|\| _d S )Nr r r
� z/Must specify only one configuration file option)r7 �appendr r8 r) �lenr )r9 � filenamesr r r �finalize_optionsa s
zoption_base.finalize_optionsN)r/ r0 r1 )r2 r3 r4 )r5 r. r6 )�__name__�
__module__�__qualname__�__doc__�user_options�boolean_optionsr: r? r r r r r L s c @ sJ e Zd ZdZdZddddgej Zejdg Zdd� Zdd� Z dd� Z
dS )r z#Save command-line options to a filez1set an option in setup.cfg or another config file�command=�c�command to set an option for�option=�o�
option to set�
set-value=�s�value of the option�remove�r�remove (unset) the valuec C s&