Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes15kdownloads
setopt.cpython-313.pyc48 linesDownload Raw Back to __pycache__
1�

2��j����SSKrSSKrSSKJr SSKJr SSKrSSKJr SSKJ	r	 SSK3Jr /SQrSS	jr
SS4jr"SS\5r"S
S\5rg)�N�)�Command)�_cfg_read_utf8_with_fallback)�log)�DistutilsOptionError)�convert_path)�config_file�edit_config�option_base�setoptc�x�US:XagUS:XaK[RR[RR[R55S5$US:XaQ[RS:H=(a S=(d Sn[RR[S	US6355$[SU5e)zyGet the filename of the distutils, local, global, or per-user config7 8`kind` must be one of "local", "global", or "user"9�localz	setup.cfg�globalz
distutils.cfg�user�posix�.�z~/zpydistutils.cfgz7config_file() type must be 'local', 'global', or 'user')10�os�path�join�dirname�	distutils�__file__�name�11expanduserr�12ValueError)�kind�dots  �_D:\code\apps\devtools\python\user_packages\Python313\site-packages\setuptools/command/setopt.pyr	r	s���13�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�14�N�PT�15U�U�c	��[R"SU5 [R"5nSUl[X 5 UR
5GH"up4Uc*[R"SX05 URU5 M3URU5(d([R"SX05 URU5 UR
5H�upVUck[R"SX5U5 URX55 URU5(d*[R"SX05 URU5 MqMs[R"SX5X`5 URX5U5 M� GM% [R"S	U5 [US16SS9nURU5 SSS5 g!,(df   g=f)
aEEdit a configuration file to include `settings`17 18`settings` is a dictionary of dictionaries or ``None`` values, keyed by19command/section name.  A ``None`` value means to delete the entire section,20while a dictionary lists settings to be changed or deleted in that section.21A setting of ``None`` means to delete that setting.22zReading configuration from %sc��U$�N�)�	optionstrs r�<lambda>�edit_config.<locals>.<lambda>(s��r NzDeleting section [%s] from %szAdding new section [%s] to %szDeleting %s.%s from %sz#Deleting empty [%s] section from %szSetting %s.%s to %r in %sz23Writing %s�wzutf-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        rr24r25sZ���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�	.�!��26�27�1�
�28/�	.�	.�s�F4�429Gc�8�\rSrSrSr/SQrSS/rSrS30SjrS	r	g)r�Gz<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)rArCc�.�SUlSUlSUlgr#)�
global_config�user_configr8��selfs r�initialize_options�option_base.initialize_optionsUs��!��������
r Nc��/nUR(aUR[S55 UR(aUR[S55 URbURUR5 U(dUR[S55 [U5S:�a[
SU5eUuUlg)Nrrr�z/Must specify only one configuration file option)rF�appendr	rGr8�lenr)rI�	filenamess  r�finalize_options�option_base.finalize_optionsZs����	�������[��2�3�������[��0�1��=�=�$����T�]�]�+�����[��1�2��y�>�A��&�A�9��
�%���r )r8rFrG��returnN)31�__name__�32__module__�__qualname__�__firstlineno__�__doc__�user_options�boolean_optionsrJrQ�__static_attributes__r$r rrrGs%��F��L�	���O�33�34%r rc�x�\rSrSrSrSr/SQ\R-r\RS/-rSr	SSjr35SS	jrS36rg)r�kz#Save command-line options to a filez1set an option in setup.cfg or another config file))zcommand=�czcommand to set an option for)zoption=�oz
option to set)z37set-value=�szvalue of the option)�remove�rzremove (unset) the valuerbc�f�[RU5 SUlSUlSUlSUlgr#)rrJ�commandr<�	set_valuerbrHs rrJ�setopt.initialize_optionsys,���&�&�t�,������������r Nc���[RU5 URb
URc[	S5eUR38cUR(d[	S5egg)Nz%Must specify --command *and* --optionz$Must specify --set-value or --remove)rrQrer<rrfrbrHs rrQ�setopt.finalize_options�sS���$�$�T�*��<�<��4�;�;�#6�&�'N�O�O��>�>�!�$�+�+�&�'M�N�N�+6�!r c��[URURURR	SS5UR39005 g)N�-�_)r40r8rer<�replacerfrHs r�run�41setopt.run�s7����M�M�
�\�\�D�K�K�/�/��S�9�4�>�>�J�K�	42r )rer<rbrfrS)
rUrVrWrXrY�descriptionrrZr[rJrQrnr\r$r rrrksE��-�E�K��43	� � �!�L�"�1�1�X�J�>�O��O�44r r)rrS)r+rrr�
unicode_utilsrrr�distutils.errorsr�distutils.utilr�__all__r	r45rrr$r r�<module>rusG���	��8���1�'�46A��V�&�R!%�'�!%�H 47�[� 48r 
codekingpro/portable-devtools · Team Ai