ó
    Lƒwj@  ã                   ó¬   • S SK r S SKrS SKJr  SSKJr  SSKJr  S SKrS SKJ	r	  S SK
Jr  S SKJr  / S	QrSS
 jrSS jr " S S\5      r " S S\5      rg)é    N)ÚClassVaré   )ÚCommand)Ú_cfg_read_utf8_with_fallback)Úlog)ÚDistutilsOptionError)Úconvert_path)Úconfig_fileÚedit_configÚoption_baseÚsetoptc                 óx  • U S:X  a  gU S:X  aK  [         R                  R                  [         R                  R                  [        R
                  5      S5      $ U S:X  aQ  [         R                  S:H  =(       a    S=(       d    Sn[         R                  R                  [        S	U S
35      5      $ [        SU 5      e)zyGet 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     Ú§C:\Users\johnn\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\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           	      óŠ  • [         R                  " SU 5        [        R                  " 5       nS Ul        [        X 5        UR                  5        GH"  u  p4Uc*  [         R                  " SX05        UR                  U5        M3  UR                  U5      (       d(  [         R                  " SX05        UR                  U5        UR                  5        H�  u  pVUck  [         R                  " SX5U 5        UR                  X55        UR                  U5      (       d*  [         R                  " SX05        UR                  U5        Mq  Ms  [         R                  " SX5X`5        UR                  X5U5        MŸ     GM%     [         R                  " S	U 5        [        U S
SS9 nUR                  U5        SSS5        g! , (       d  f       g= f)aE  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                 ó   • U $ ©N© )Ú	optionstrs    r    Ú<lambda>Ú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Úsectionr5   ÚoptionÚvalueÚfs           r    r   r      sZ  € ô ‡I‚IÐ-¨xÔ8Ü×'Ò'Ó)€DÙ2€DÔÜ  Ô0à$ŸN™N×,ÑˆØ‰?Ü�HŠHÐ4°gÔHØ×Ñ Ö(à×#Ñ# G×,Ñ,Ü—	’	Ð9¸7ÔMØ× Ñ  Ô)Ø!(§¡¦‘�Ø‘=Ü—I’IÐ6¸ÈÔRØ×&Ñ& wÔ7ØŸ<™<¨×0Ñ0ÜŸšØAÀ7ôð ×+Ñ+¨GÖ4ñ	 1ô —I’IØ3°WÀeôð —H‘H˜W¨eÖ4ô "1ñ -ô. ‡H‚Hˆ\˜8Ô$Ü	ˆh˜ gÒ	.°!Ø�
‰
�1Œ÷ 
/×	.Ö	.ús   ÆF4Æ4
Gc                   ó�   • \ rS rSr% Sr/ SQr\\\\	\	\	4      \\\	\	S-  \	4      -     \
S'   SS/r\\\	      \
S'   S	 rSS
 jrSrg)r   éH   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_optionsrB   rD   Úboolean_optionsc                 ó.   • S U l         S U l        S U l        g r$   )Úglobal_configÚuser_configr9   ©Úselfs    r    Úinitialize_optionsÚoption_base.initialize_optionsX   s   € Ø!ˆÔØˆÔØˆ�r!   c                 óŽ  • / nU R                   (       a  UR                  [        S5      5        U R                  (       a  UR                  [        S5      5        U R                  b  UR                  U R                  5        U(       d  UR                  [        S5      5        [        U5      S:”  a  [        SU5      eUu  U l        g )Nr   r   r   é   z/Must specify only one configuration file option)rI   Úappendr
   rJ   r9   Úlenr   )rL   Ú	filenamess     r    Úfinalize_optionsÚoption_base.finalize_options]   s›   € Øˆ	Ø××Ø×Ñœ[¨Ó2Ô3Ø××Ø×Ñœ[¨Ó0Ô1Ø�=‰=Ñ$Ø×Ñ˜TŸ]™]Ô+ÞØ×Ñœ[¨Ó1Ô2Üˆy‹>˜AÓÜ&ØAÀ9óð ð %Ñˆ�r!   )r9   rI   rJ   ©ÚreturnN)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__rF   r   ÚlistÚtupleÚstrÚ__annotations__rG   rM   rT   Ú__static_attributes__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                   óx   • \ rS rSrSrSr/ SQ\R                  -   r\R                  S/-   rS r	SS jr
SS	 jrS
rg)r   én   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 valuerg   c                 óf   • [         R                  U 5        S U l        S U l        S U l        S U l        g r$   )r   rM   Úcommandr=   Ú	set_valuerg   rK   s    r    rM   Úsetopt.initialize_options|   s,   € Ü×&Ñ& tÔ,ØˆŒØˆŒØˆŒØˆ�r!   Nc                 óÌ   • [         R                  U 5        U R                  b  U R                  c  [	        S5      eU R
                  c  U R                  (       d  [	        S5      eg g )Nz%Must specify --command *and* --optionz$Must specify --set-value or --remove)r   rT   rj   r=   r   rk   rg   rK   s    r    rT   Úsetopt.finalize_optionsƒ   sS   € Ü×$Ñ$ TÔ*Ø�<‰<Ñ 4§;¡;Ñ#6Ü&Ð'NÓOÐOØ�>‰>Ñ!¨$¯+¯+Ü&Ð'MÓNÐNð +6Ð!r!   c                 ó”   • [        U R                  U R                  U R                  R	                  SS5      U R
                  005        g )NÚ-Ú_)r   r9   rj   r=   Úreplacerk   rK   s    r    ÚrunÚ
setopt.runŠ   s7   € ÜØ�M‰MØ�\‰\˜DŸK™K×/Ñ/°°SÓ9¸4¿>¹>ÐJÐKõ	
r!   )rj   r=   rg   rk   rV   )rX   rY   rZ   r[   r\   Údescriptionr   rF   rG   rM   rT   rs   ra   r%   r!   r    r   r   n   sE   † Ù-àE€Kòð
 	× Ñ ñ!€Lð "×1Ñ1°X°JÑ>€OòôO÷
r!   r   )r   rV   )r,   r   Útypingr   r   r   Úunicode_utilsr   r   r   Údistutils.errorsr   Údistutils.utilr	   Ú__all__r
   r   r   r   r%   r!   r    Ú<module>r{      sJ   ðÛ Û 	Ý å Ý 8ã Ý Ý 1Ý 'â
A€ôVô&ôR#%�'ô #%ôL 
ˆ[õ  
r!   