ó
    µ'Ôi·  ã                   ó    • S SK r S SK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é   )Ú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     ÚX/var/www/surfInsights/venv3-11/lib/python3.13/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Úsectionr4   Ú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                   ó8   • \ rS rSrSr/ SQrSS/rS rS
S jrS	r	g)r   éG   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)rA   rC   c                 ó.   • S U l         S U l        S U l        g r#   )Úglobal_configÚuser_configr8   ©Úselfs    r   Úinitialize_optionsÚoption_base.initialize_optionsU   s   € Ø!ˆÔØˆÔØˆ�r    Nc                 óŽ  • / 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)rF   Úappendr	   rG   r8   Úlenr   )rI   Ú	filenamess     r   Úfinalize_optionsÚoption_base.finalize_optionsZ   s›   € Øˆ	Ø××Ø×Ñœ[¨Ó2Ô3Ø××Ø×Ñœ[¨Ó0Ô1Ø�=‰=Ñ$Ø×Ñ˜TŸ]™]Ô+ÞØ×Ñœ[¨Ó1Ô2Üˆy‹>˜AÓÜ&ØAÀ9óð ð %Ñˆ�r    )r8   rF   rG   ©ÚreturnN)
Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Úuser_optionsÚboolean_optionsrJ   rQ   Ú__static_attributes__r$   r    r   r   r   G   s%   † ÙFò€Lð 	Øð€Oò
÷
%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   ék   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 valuerb   c                 óf   • [         R                  U 5        S U l        S U l        S U l        S U l        g r#   )r   rJ   Úcommandr<   Ú	set_valuerb   rH   s    r   rJ   Úsetopt.initialize_optionsy   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   rQ   re   r<   r   rf   rb   rH   s    r   rQ   Ú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
   r8   re   r<   Úreplacerf   rH   s    r   ÚrunÚ
setopt.run‡   s7   € ÜØ�M‰MØ�\‰\˜DŸK™K×/Ñ/°°SÓ9¸4¿>¹>ÐJÐKõ	
r    )re   r<   rb   rf   rS   )rU   rV   rW   rX   rY   Údescriptionr   rZ   r[   rJ   rQ   rn   r\   r$   r    r   r   r   k   sE   † Ù-àE€Kòð
 	× Ñ ñ!€Lð "×1Ñ1°X°JÑ>€OòôO÷
r    r   )r   rS   )r+   r   r   r   Úunicode_utilsr   r   r   Údistutils.errorsr   Údistutils.utilr   Ú__all__r	   r
   r   r   r$   r    r   Ú<module>ru      sG   ðÛ Û 	å Ý 8ã Ý Ý 1Ý 'â
A€ôVô&ôR!%�'ô !%ôH 
ˆ[õ  
r    