Ë
    óÇ:j·  ã                   óœ   — d dl Z d dl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é   )Ú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     ún/home/mcse/projects/srt_converter/srt-converter-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Úsectionr3   Ú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dZg d¢ZddgZ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)r?   rA   c                 ó.   — d | _         d | _        d | _        y r#   )Úglobal_configÚuser_configr7   ©Úselfs    r   Úinitialize_optionszoption_base.initialize_optionsU   s   € Ø!ˆÔØˆÔØˆ�r    Nc                 ó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)rD   Úappendr	   rE   r7   Úlenr   )rG   Ú	filenamess     r   Úfinalize_optionszoption_base.finalize_optionsZ   s›   € Øˆ	Ø×ÒØ×Ñœ[¨Ó2Ô3Ø×ÒØ×Ñœ[¨Ó0Ô1Ø�=‰=Ð$Ø×Ñ˜TŸ]™]Ô+ÙØ×Ñœ[¨Ó1Ô2Üˆy‹>˜AÒÜ&ØAÀ9óð ð %Ñˆ�r    ©ÚreturnN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Úuser_optionsÚboolean_optionsrH   rN   r$   r    r   r   r   G   s%   „ ÙFò€Lð 	Øð€Oò
ô
%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   rH   Úcommandr;   Ú	set_valuer[   rF   s    r   rH   zsetopt.initialize_optionsy   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   rN   r^   r;   r   r_   r[   rF   s    r   rN   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
   r7   r^   r;   Úreplacer_   rF   s    r   Úrunz
setopt.run‡   s7   € ÜØ�M‰MØ�\‰\˜DŸK™K×/Ñ/°°SÓ9¸4¿>¹>ÐJÐKõ	
r    rO   )rQ   rR   rS   rT   Údescriptionr   rU   rV   rH   rN   re   r$   r    r   r   r   k   sE   „ Ù-àE€Kòð
 	× Ñ ñ!€Lð "×1Ñ1°X°JÑ>€OòóOô
r    r   )r   rO   )r*   r   r   r   Úunicode_utilsr   r   r   Údistutils.errorsr   Údistutils.utilr   Ú__all__r	   r
   r   r   r$   r    r   ú<module>rk      sG   ðÛ Û 	å Ý 8ã Ý Ý 1Ý 'â
A€óVó&ôR!%�'ô !%ôH 
ˆ[õ  
r    