Ë
    ¨Õ°j@  ã                   ó¨   — d dl Z d dlZd dlmZ ddlmZ ddlmZ d dlZd dlm	Z	 d dl
mZ d dlmZ g d	¢Zdd
„Zdd„Z G d„ de«      Z G d„ de«      Zy)é    N)ÚClassVaré   )ÚCommand)Ú_cfg_read_utf8_with_fallback)Úlog)ÚDistutilsOptionError)Úconvert_path)Úconfig_fileÚedit_configÚoption_baseÚsetoptc                 ó^  — | dk(  ry| dk(  rKt         j                  j                  t         j                  j                  t        j
                  «      d«      S | dk(  rGt         j                  dk(  xr dxs d}t         j                  j                  t        d	|› d
�«      «      S t        d| «      ‚)z�Get the filename of the distutils, local, global, or per-user config

    `kind` must be one of "local", "global", or "user"
    Úlocalz	setup.cfgÚglobalzdistutils.cfgÚuserÚposixú.Ú z~/zpydistutils.cfgz7config_file() type must be 'local', 'global', or 'user')
ÚosÚpathÚjoinÚdirnameÚ	distutilsÚ__file__ÚnameÚ
expanduserr	   Ú
ValueError)ÚkindÚdots     úO/var/www/mission/venv/lib/python3.12/site-packages/setuptools/command/setopt.pyr
   r
      s�   € ð
 ˆw‚ØØˆxÒÜ�w‰w�|‰|œBŸG™GŸO™O¬I×,>Ñ,>Ó?ÀÓQÐQØˆv‚~Ü�g‰g˜Ñ Ò( SÒ.¨BˆÜ�w‰w×!Ñ!¤,°°C°5¸Ð/HÓ"IÓJÐJÜ
ÐNÐPTÓ
UÐUó    c           	      óf  — t        j                  d| «       t        j                  «       }d„ |_        t        || «       |j                  «       D �]  \  }}|€)t        j                  d|| «       |j                  |«       Œ2|j                  |«      s(t        j                  d|| «       |j                  |«       |j                  «       D ]˜  \  }}|€et        j                  d||| «       |j                  ||«       |j                  |«      rŒDt        j                  d|| «       |j                  |«       Œmt        j                  d|||| «       |j                  |||«       Œš �Œ t        j                  d	| «       t        | d
d¬«      5 }|j                  |«       ddd«       y# 1 sw Y   yxY w)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 ©N© )Ú	optionstrs    r    ú<lambda>zedit_config.<locals>.<lambda>)   s   € ¨€ r!   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Úwzutf-8)Úencoding)r   ÚdebugÚconfigparserÚRawConfigParserÚoptionxformr   ÚitemsÚinfoÚremove_sectionÚhas_sectionÚadd_sectionÚremove_optionÚoptionsÚsetÚopenÚwrite)ÚfilenameÚsettingsÚoptsÚsectionr4   ÚoptionÚvalueÚfs           r    r   r      sv  € ô ‡I�IÐ-¨xÔ8Ü×'Ñ'Ó)€DÙ2€DÔÜ   xÔ0à$ŸN™NÓ,ó 5Ñˆ�Øˆ?Ü�H‰HÐ4°g¸xÔHØ×Ñ Õ(à×#Ñ# GÔ,Ü—	‘	Ð9¸7ÀHÔMØ× Ñ  Ô)Ø!(§¡£ò 5‘�˜Ø�=Ü—I‘IÐ6¸ÀÈÔRØ×&Ñ& w°Ô7ØŸ<™<¨Õ0ÜŸ™ØAÀ7ÈHôð ×+Ñ+¨GÕ4ä—I‘IØ3°W¸fÀeÈXôð —H‘H˜W f¨eÕ4ò5ð5ô. ‡H�Hˆ\˜8Ô$Ü	ˆh˜ gÔ	.ð °!Ø�
‰
�1Œ÷÷ ñ ús   ÆF'Æ'F0c                   ó†   — e Zd ZU dZg d¢Zeeeeeef      eeeedz  ef      z     e	d<   ddgZ
eee      e	d<   d„ Zd
d	„Zy)r   z<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)NÚuser_optionsr@   rB   Úboolean_optionsc                 ó.   — d | _         d | _        d | _        y r$   )Úglobal_configÚuser_configr8   ©Úselfs    r    Úinitialize_optionszoption_base.initialize_optionsX   s   € Ø!ˆÔØˆÔØˆ�r!   c                 ól  — g }| j                   r|j                  t        d«      «       | j                  r|j                  t        d«      «       | j                  �|j                  | j                  «       |s|j                  t        d«      «       t        |«      dkD  rt        d|«      ‚|\  | _        y )Nr   r   r   é   z/Must specify only one configuration file option)rG   Úappendr
   rH   r8   Úlenr   )rJ   Ú	filenamess     r    Úfinalize_optionszoption_base.finalize_options]   s›   € Øˆ	Ø×ÒØ×Ñœ[¨Ó2Ô3Ø×ÒØ×Ñœ[¨Ó0Ô1Ø�=‰=Ð$Ø×Ñ˜TŸ]™]Ô+ÙØ×Ñœ[¨Ó1Ô2Üˆy‹>˜AÒÜ&ØAÀ9óð ð %Ñˆ�r!   ©ÚreturnN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__rD   r   ÚlistÚtupleÚstrÚ__annotations__rE   rK   rQ   r%   r!   r    r   r   H   sq   … ÙFò	ð �(ØˆU�3˜˜S�=Ñ!Ñ" T¨%°°S¸4±ZÀÐ0DÑ*EÑ%FÑFñó ð 	Øð,€O�X˜d 3™iÑ(ó ò
ô
%r!   r   c                   ól   — e Zd ZdZdZg d¢ej                  z   Zej                  dgz   Zd„ Zd	d„Z	d	d„Z
y)
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 valuer`   c                 óf   — t         j                  | «       d | _        d | _        d | _        d | _        y r$   )r   rK   Úcommandr<   Ú	set_valuer`   rI   s    r    rK   zsetopt.initialize_options|   s,   € Ü×&Ñ& tÔ,ØˆŒØˆŒØˆŒØˆ�r!   Nc                 ó¼   — t         j                  | «       | j                  �| j                  €t	        d«      ‚| j
                  €| j                  st	        d«      ‚y y )Nz%Must specify --command *and* --optionz$Must specify --set-value or --remove)r   rQ   rc   r<   r   rd   r`   rI   s    r    rQ   zsetopt.finalize_optionsƒ   sS   € Ü×$Ñ$ TÔ*Ø�<‰<Ð 4§;¡;Ð#6Ü&Ð'NÓOÐOØ�>‰>Ð!¨$¯+ª+Ü&Ð'MÓNÐNð +6Ð!r!   c                 ó”   — t        | j                  | j                  | j                  j	                  dd«      | j
                  ii«       y )Nú-Ú_)r   r8   rc   r<   Úreplacerd   rI   s    r    Úrunz
setopt.runŠ   s7   € ÜØ�M‰MØ�\‰\˜DŸK™K×/Ñ/°°SÓ9¸4¿>¹>ÐJÐKõ	
r!   rR   )rT   rU   rV   rW   Údescriptionr   rD   rE   rK   rQ   rj   r%   r!   r    r   r   n   sE   „ Ù-àE€Kòð
 	× Ñ ñ!€Lð "×1Ñ1°X°JÑ>€OòóOô
r!   r   )r   rR   )r+   r   Útypingr   r   r   Úunicode_utilsr   r   r   Údistutils.errorsr   Údistutils.utilr	   Ú__all__r
   r   r   r   r%   r!   r    ú<module>rq      sJ   ðÛ Û 	Ý å Ý 8ã Ý Ý 1Ý 'â
A€óVó&ôR#%�'ô #%ôL 
ˆ[õ  
r!   