£Á°èZ¨Ä…–K§‚«“ô4“ÒÙ´dîfUÙÃÅ WKbyÊ¦•êŽ…È®FÒ¿ÊÎóCozá¬S@6{Í:›œêZÌ:Š•_%:¢¾¾~;‘Ã~èŠ©ÊÇí`ÔÑ©úë™µ'5I¿fš×WO%ø9¾«¾DK|€ùÍD”Ýs]nHÕ¶ê×Ó¼ãžªéUWŸÈË%DÒÕ¬ï‘]/Åcx  ‰ï2ß]ä6G[]S£ÔÏ¯rs{úëóµmÒï#UQxo·õÞCe]"±/aÙ&Eã4ú9Jé_ÞåëdãöKë)AÞ                  ¯¹ægƒÛowÐø^d™ý½ßB7áyMä9ÜÖUã
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
<html>
B
    Re                 @   s   d dl mZ d dlmZ d dlmZ d dlZd dlZd dlZd dlm	Z	 dddd	gZ
dddZdddZG dd de	ZG dd	 d	eZdS )    )convert_path)log)DistutilsOptionErrorN)Commandconfig_fileedit_configoption_basesetoptlocalc             C   sh   | dkrdS | dkr,t jt jtjdS | dkrZt jdkrBdpDd}t jtd	| S t	d
| dS )zGet 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   /builddir/build/BUILDROOT/alt-python37-setuptools-58.3.0-4.el8.x86_64/opt/alt/python37/lib/python3.7/site-packages/setuptools/command/setopt.pyr      s    Fc       	   	   C   s8  t d|  t }dd |_|| g x| D ]\}}|dkr^t d||  || q4|	|st d||  |
| x|| D ]p\}}|dkrt d|||  ||| ||st d||  || qt d	||||  |||| qW q4W t d
|  |s4t| d}|| W dQ R X dS )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.
    zReading configuration from %sc             S   s   | S )Nr   )xr   r   r   <lambda>*       zedit_config.<locals>.<lambda>NzDeleting section [%s] from %szAdding new section [%s] to %szDeleting %s.%s from %sz#Deleting empty [%s] section from %szSetting %s.%s to %r in %sz
Writing %sw)r   debugconfigparserRawConfigParseroptionxformreaditemsinforemove_sectionhas_sectionadd_sectionremove_optionoptionssetopenwrite)	filenamesettingsdry_runoptssectionr,   optionvaluefr   r   r   r       s:    




c               @   s2   e Zd ZdZdddgZddgZdd Zd	d
 ZdS )r   z<Abstract base class for commands that mess with config files)zglobal-configgz0save options to the site-wide distutils.cfg file)zuser-configuz7save options to the current user's pydistutils.cfg file)z	filename=r7   z-configuration file to use (default=setup.cfg)zglobal-configzuser-configc             C   s   d | _ d | _d | _d S )N)global_configuser_configr0   )selfr   r   r   initialize_options\   s    zoption_base.initialize_optionsc             C   sv   g }| j r|td | jr,|td | jd k	rB|| j |sT|td t|dkrjtd||\| _d S )Nr   r   r
      z/Must specify only one configuration file option)r:   appendr   r;   r0   lenr   )r<   	filenamesr   r   r   finalize_optionsa   s    
zoption_base.finalize_optionsN)__name__
__module____qualname____doc__user_optionsboolean_optionsr=   rB   r   r   r   r   r   L   s   c               @   sJ   e Zd ZdZdZddddgej Zejdg Zdd	 Zd
d Z	dd Z
dS )r	   z#Save command-line options to a filez1set an option in setup.cfg or another config file)zcommand=czcommand to set an option for)zoption=ozoption to set)z
set-value=szvalue of the option)removerzremove (unset) the valuerL   c             C   s&   t |  d | _d | _d | _d | _d S )N)r   r=   commandr5   	set_valuerL   )r<   r   r   r   r=      s
    
zsetopt.initialize_optionsc             C   sB   t |  | jd ks| jd kr&td| jd kr>| js>tdd S )Nz%Must specify --command *and* --optionz$Must specify --set-value or --remove)r   rB   rN   r5   r   rO   rL   )r<   r   r   r   rB      s
    
zsetopt.finalize_optionsc             C   s*   t | j| j| jdd| jii| j d S )N-_)r   r0   rN   r5   replacerO   r2   )r<   r   r   r   run   s    z
setopt.runN)rC   rD   rE   rF   descriptionr   rG   rH   r=   rB   rS   r   r   r   r   r	   s   s   )r
   )F)distutils.utilr   r   r   distutils.errorsr   r   r"   
setuptoolsr   __all__r   r   r   r	   r   r   r   r   <module>   s   

,'