Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
dist.cpython-313.pyc318 linesDownload Raw Back to __pycache__
1�

2��j������%SrSSKJr SSKrSSKrSSKrSSKrSSKrSSKrSSK	r	SSK3JrJr SSK
Jr SSKJrJrJrJrJrJrJrJr SSKJrJr SS	KJr SS4KJr SSKJ r J!r!J"r"J#r# SSK$J%r%J&r& SS
K'J(r(J)r)J*r* \(aSSK+J,r, SSK-J.r. SSK/J0r0 \"SSS9r1\2\\3\4\\4S4\4\54\3\4\\4S4\444r6S\7S'\Rp"S5r9SSjr:"SS5r;"SS5r<Sr=g)z}distutils.dist5 6Provides the Distribution class, which represents the module distribution7being built/installed/distributed.8�)�annotationsN)�Iterable�MutableMapping)�message_from_file)�IO�
TYPE_CHECKING�Any�ClassVar�Literal�TypeVar�Union�overload)�canonicalize_name�canonicalize_version���log)�DEBUG)�DistutilsArgError�DistutilsClassError�DistutilsModuleError�DistutilsOptionError)�FancyGetopt�translate_longopt)�
check_environ�
rfc822_escape�	strtobool)�
SupportsWrite)�	TypeAlias��Command�	_CommandTr!)�boundr�_OptionsListz^[a-zA-Z]([a-zA-Z0-9_]*)$c��[U[5(aU$[U[5(dR[U5RnSnUR9"S0[
5D6n[R"U5 [U5nU$)Nz>Warning: '{fieldname}' should be a list, got type '{typename}'�)	�10isinstance�str�list�type�__name__�format�localsr�warning)�value�	fieldname�typename�msgs    �`D:\code\apps\devtools\python\user_packages\Python313\site-packages\setuptools/_distutils/dist.py�_ensure_listr4>sk���%����	
��L���t�
$�
$���;�'�'��N���j�j�$�6�8�$�����C���U����L�c	��\rSrSr%Sr/SQrS\S'SrS\S'/S	QrS\S11'\VVVs/sHn[US5PM snnnr12S\S
'SS0rS\S'SQSRSjjrSr
SSSTSjjrSrSrSQSjrSrSrSrSUSjrSVSWSjjrSrSUSjrSUS jrS!rS"rSXS#jr\SYSZS$jj5r\S[S%j5rSYS\S'jjrSQS(jr\S]S^S)jj5r \S]S_S*jj5r S]S`S+jjr \!RD4SaS,jjr#SUS-jr$SbS.jr%ScS/jr&ScS0jr'ScS1jr(ScS2jr)ScS3jr*ScS4jr+ScS5jr,ScS6jr-\.(aqSUS7jr/S&\S8'S9\S:'S9\S;'S9\S<'S9\S='S9\S>'S9\S?'S9\S@'S9\SA'S9\SB'S9\SC'S9\SD'S9\SE'S9\SF'S9\SG'SH\SI'SH\SJ'SH\SK'SL\SM'SL\SN'SL\SO'SPr0gSPr0gs snnnf)d�Distribution�Ma�The core of the Distutils.  Most of the work hiding behind 'setup'13is really done within a Distribution instance, which farms the work out14to the Distutils commands specified on the command line.15 16Setup scripts will almost never instantiate Distribution directly,17unless the 'setup()' function is totally inadequate to their needs.18However, it is conceivable that a setup script might wish to subclass19Distribution for some specialized purpose, and then pass the subclass20to 'setup()' as the 'distclass' keyword argument.  If so, it is21necessary to respect the expectations that 'setup' has of Distribution.22See the code for 'setup()', in core.py, for details.23))�verbose�vzrun verbosely (default)r)�quiet�qz!run quietly (turns verbosity off))�help�hzshow detailed help message)zno-user-cfgNz-ignore pydistutils.cfg in your home directoryzClassVar[_OptionsList]�global_optionsz�Common commands: (see '--help-commands' for more)24 25  setup.py build      will build the package underneath 'build/'26  setup.py install    will install the package27z
ClassVar[str]�common_usage))z
help-commandsNzlist all available commands)�nameNzprint package name)�version�Vzprint package version)�fullnameNzprint <package name>-<version>)�authorNzprint the author's name)�author-emailNz print the author's email address)�28maintainerNzprint the maintainer's name)zmaintainer-emailNz$print the maintainer's email address)�contactNz7print the maintainer's name if known, else the author's)z
contact-emailNz@print the maintainer's email address if known, else the author's)�urlNzprint the URL for this package)�licenseNz print the license of the package)�licenceNzalias for --license)�descriptionNzprint the package description)zlong-descriptionNz"print the long package description)�	platformsNzprint the list of platforms)�classifiersNzprint the list of classifiers)�keywordsNzprint the list of keywords)�providesNz+print the list of packages/modules provided)�requiresNz+print the list of packages/modules required)�	obsoletesNz0print the list of packages/modules made obsolete�display_optionsrzClassVar[list[str]]�display_option_namesr;r9zClassVar[dict[str, str]]�negative_optNc	���SUlSUlURHn[XS5 M [	5UlUR29RH(nSU-n[X[UR30U55 M* 0UlSUl	SUl31SUl0Ul/Ul
SUl0UlSUlSUlSUlSUlSUlSUlSUlSUlSUlSUlSUl0Ul0UlU(GaNUR;S5nUbLUS	UR=5H5upgUR?U5nUR=5Hup�SU324X�'M
 M7 SU;a#USUS	'US	S33n[@RB"U5 UR=5H�up�[EUR34SU-5(a![UR35SU-5"U365 MD[EUR37U5(a[UR38X�5 Mw[EX5(a[XU395 M�SU<3n[@RB"U5 M� SUl#URbT[IUR5UlURH*n
U
RKS
5(d OU
S:XdM#SUl# O URM5 g)a�Construct a new Distribution instance: initialize all the40attributes of a Distribution, and then use 'attrs' (a dictionary41mapping attribute names to values) to assign some of those42attributes their "real" values.  (Any attributes not mentioned in43'attrs' will be assigned to some null value: 0, None, an empty list44or dictionary, etc.)  Most importantly, initialize the45'command_obj' attribute to the empty dictionary; this will be46filled in with real command objects by 'parse_command_line()'.47TF�get_N��optionszsetup scriptrKrJz:'licence' distribution option is deprecated; use 'license'�set_zUnknown distribution option: �-z
--no-user-cfg)'r9r=rT�setattr�DistributionMetadata�metadata�_METHOD_BASENAMES�getattr�cmdclass�command_packages�script_name�script_args�command_options�48dist_files�packages�package_data�package_dir�49py_modules�	libraries�headers�ext_modules�ext_package�include_dirs�50extra_path�scripts�51data_files�password�command_obj�have_run�get�items�get_option_dict�warnings�warn�hasattr�
want_user_cfgr)�52startswith�finalize_options)�self�attrs�attr�basename�method_namerY�command�cmd_options�opt_dict�opt�valr2�key�args              r3�__init__�Distribution.__init__�s��������	��-�-�D��D��&�.�-�.��
��
�
�7�7�H� �8�+�K��D�w�t�}�}�k�'J�K�8�35��
�9=���53;?���-1���GI���79���54��
�24��������������������� ��������������
�02���*,��
��55�i�i�	�*�G��"��)�$�,3�M�M�O�(�G�#�3�3�G�<�H�$/�$5�$5�$7���)7��(=��
�%8�-<�56�E�!�#(��#3��i� ��)�$�R���
�
�c�"�"�K�K�M����4�=�=�&�3�,�7�7��D�M�M�6�C�<�8��=��T�]�]�C�0�0��D�M�M�3�4��T�'�'��D�s�+�9�#��A�C��M�M�#�&�*�""������'�#�D�$4�$4�5�D���'�'���~�~�c�*�*���/�)�).�D�&��(�	
���r5c�b�URRU5nUc0=o RU'U$)z�Get the option dictionary for a given command.  If that57command's option dictionary hasn't been created yet, then create it58and return the new dictionary; otherwise, return the existing59option dictionary.60)rerv)rr��dicts   r3rx�Distribution.get_option_dict5s7���#�#�'�'��0���<�35�5�D�'�'��0��r5c���SSKJn Uc#[URR	55nUbURX1-5 US-nU(dURUS-5 gUH�nURR
U5nUcURUSUS3-5 M;URUSUS3-5 U"U5nURS	5HnURUS-U-5 M M� g)61Nr)�pformat�  zno commands known yetzno option dict for 'z	' commandzoption dict for '�62' command:�63)�pprintr��sortedre�keys�announcerv�split)	r�header�commands�indentr��cmd_namer��out�lines	         r3�dump_option_dicts�Distribution.dump_option_dicts@s���"����d�2�2�7�7�9�:�H����M�M�&�/�*��d�]�F���M�M�&�#:�:�;�� �H��+�+�/�/��9�H����
�
�f�)=�h�Z�y�'Q�Q�R��
�
�f�):�8�*�J�'O�O�P��h�'���I�I�d�O�D��M�M�&�4�-�$�"6�7�,�!r5c�6�[5 UR5Vs/sH4n[RR	U5(dM)[U5PM6 nn[(a/URSRSRU555 U$s snf)avFind as many configuration files as should be processed for this64platform, and return a list of filenames in the order in which they65should be parsed.  The filenames returned are guaranteed to exist66(modulo nasty race conditions).67 68There are multiple possible config files:69- distutils.cfg in the Distutils installation directory (i.e.70  where the top-level Distutils __inst__.py file lives)71- a file in the user's home directory named .pydistutils.cfg72  on Unix and pydistutils.cfg on Windows/Mac; may be disabled73  with the ``--no-user-cfg`` option74- setup.cfg in the current directory75- a file named by an environment variable76zusing config files: {}z, )77r�78_gen_paths�os�path�isfiler(rr�r,�join)rr��filess   r3�find_config_files�Distribution.find_config_filesZsl��	��'+���'8�Q�'8�t�B�G�G�N�N�4�<P���T��'8��Q��5��M�M�2�9�9�$�)�)�E�:J�K�L����Rs�(B�	Bc#�# �[R"[RSR5R79nUS-v� S[RS:H-nUS-nUR(aL[R"[5 [R"S5R5U-v� SSS5 [R"S5v� [R"[5 [R"[R"S55v� SSS5 g!,(df   Nv=f!,(df   g=f7f)	N�	distutilsz
distutils.cfg�.�posixzpydistutils.cfg�~z	setup.cfg�DIST_EXTRA_CONFIG)�pathlib�Path�sys�modules�__file__�parentr�rAr|�80contextlib�suppress�RuntimeError�81expanduser�	TypeError�getenv)r�sys_dir�prefix�filenames    r3r��Distribution._gen_pathsqs�����,�,�s�{�{�;�7�@�@�A�H�H����'�'�����7�*�+���-�-������$�$�\�2��l�l�3�'�2�2�4�x�?�?�3��l�l�;�'�'��
 �
 ��
+��,�,�r�y�y�)<�=�>�>�,�
+�3�2��,�
+�s6�B	E�*D%�5:E�/-D6�	E�%82D3�/E�683E�Ec���SSKJn [R[R:wa/SQnO/n[U5nUcUR
5n[(aURS5 U"5nUH�n[(aURSU35 URUSS9 UR5HenURU5nURU5nUH:n	U	S:wdMX�;dMURXi5n84U	RS	S855n	XZ4X�'M< Mg UR5 M� SUR ;a�UR SR#5Hpun	up�UR$RU	5nU(a['X[)U865(+5 MGU	S;a['X	[)U8755 Md['X	U885 Mr gg![*an
[-U
5eSn
A
ff=f)
Nr)�ConfigParser)
zinstall-basezinstall-platbasezinstall-libzinstall-platlibzinstall-purelibzinstall-headerszinstall-scriptszinstall-datar�zexec-prefix�home�user�rootz"Distribution.parse_config_files():z89  reading zutf-8��encodingr+r[�_�global)r9)�configparserr�r�r��base_prefix�	frozensetr�rr��read�sectionsrYrxrv�replacer�rerwrUr\r�90ValueErrorr)r�	filenamesr��ignore_options�parserr��sectionrYr�r�r��_src�aliasr2s              r3�parse_config_files�Distribution.parse_config_files�s���-��:�:����(��N�  �N�"�>�2�����.�.�0�I��5��M�M�>�?����!�H��u��
�
�91�8�*�5�6��K�K��7�K�3�!�?�?�,�� �.�.��1���/�/��8��"�C��j�(�S�-F�$�j�j��6��!�k�k�#�s�3��)1���
�	#�	-�
�O�O��!"�*�t�+�+�+�$(�$8�$8��$B�$H�$H�$J� ��[�d��)�)�-�-�c�2��4�����3��-?�@���,���9�S�>�:���3�/�%K�,��"�4�.�s�3�3��4�s$�!G�&G�G�92G/�G*�*G/c���UR5n/Ul[XR-5nUR	UR935 UR
SS05 URURUS9nUR5n[R"5R[RSUR--945 URU5(agU(aUR!X#5nUcgU(aMUR"(a2UR%U['UR5S:HURS9 gUR(d[)S5eg	)95a�Parse the setup script's command line, taken from the96'script_args' instance attribute (which defaults to 'sys.argv[1:]'97-- see 'setup()' in core.py).  This list is first processed for98"global options" -- options that set attributes of the Distribution99instance.  Then, it is alternately scanned for Distutils commands100and options for that command.  Each new command terminates the101options for the previous command.  The allowed options for a102command are determined by the 'user_options' attribute of the103command class -- thus, we have to be able to load command classes104in order to parse the command line.  Any error in that 'options'105attribute raises DistutilsGetoptError; any error on the106command-line raises DistutilsArgError.  If no Distutils commands107were found on the command line, raises DistutilsArgError.  Return108true if command-line was successfully parsed and we should carry109on with executing commands; false if no errors but we shouldn't110execute commands (currently, this only happens if user asks for111help).112rKrJ)�args�object�113Nr�rSr�zno commands suppliedT)�_get_toplevel_optionsr�rrS�set_negative_aliasesrU�set_aliases�getoptrd�get_option_order�logging�	getLogger�setLevel�WARNr9�handle_display_options�_parse_command_optsr=�114_show_help�lenr)r�toplevel_optionsr�r��option_orders     r3�parse_command_line�Distribution.parse_command_line�s0��. �5�5�7����
��-�0D�0D�D�E���#�#�D�$5�$5�6����I�y�1�2��}�}�$�"2�"2�4�}�@���.�.�0������$�$�W�\�\�B����4E�%E�F��&�&�|�4�4����+�+�F�9�D��|���d��9�9��O�O���D�M�M�(:�a�(?�$�-�-�
�
�
��}�}�#�$:�;�;�r5c�"�URS/-$)z�Return the non-display options recognized at the top level.115 116This includes options that are recognized *only* at the top117level as well as options recognized for commands.118)zcommand-packages=Nz0list of packages that provide distutils commands)r?�rs r3r��"Distribution._get_toplevel_optionss!���"�"�
�&119�120�	121r5c��SSKJn USn[RU5(d[	SUS35eUR122R
U5 URU5n[XS5(d[SUS35e[US5(a[UR[5(dS	n[Xe-5eUR n[US1235(a+UR#5nUR%UR 5 [US5(a5[UR&[5(a[)UR&5nO/nUR+UR,UR-U-5 UR/U5 UR1USS5up)[U	S
5(a$U	R2(aUR5USU/S9 g[US5(a�[UR&[5(amSn124UR&HSup�p�[X�R7U55(dM'Sn125[9U5(a	U"5 MB[SU<SUS35e U126(agUR;U5n[=U	5R?5H
unnSU4UU'M U$![an[U5eSnAff=f)a�Parse the command-line options for a single command.127'parser' must be a FancyGetopt instance; 'args' must be the list128of arguments, starting with the current command (whose options129we are about to parse).  Returns a new version of 'args' with130the next command at the front of the list; will be the empty131list if there are no more commands on the command line.  Returns132None if the user asked for help on this command.133rr zinvalid command name '�'Nzcommand class z must subclass Command�user_optionszIcommand class %s must provide 'user_options' attribute (a list of tuples)rU�help_optionsrr=Fr�zinvalid help function z for help option 'z-': must be a callable object (function, etc.)zcommand line) �
distutils.cmdr!�134command_re�match�135SystemExitr��append�get_command_classrr�136issubclassrr{r'r�r)rU�copy�updater��fix_help_options�set_option_tabler?r�r�r=r��
get_attr_name�callablerx�varsrw)rr�r�r!r��	cmd_classr2rUr��opts�help_option_found�help_option�_short�_desc�funcr�rAr/s                  r3r�� Distribution._parse_command_optss���	*��q�'������(�(��5�g�Y�a�@�A�A��
�
���W�%�137	)��.�.�w�7�I��)�-�-�%� ���+A�B��
�
�I�~�.�.��9�1�1�4�8�8�>�
�&�c�o�6�6��(�(���9�n�-�-�'�,�,�.�L����	� 6� 6�7��9�n�-�-�*��"�"�D�3138�3139�,�I�,B�,B�C�L��L�	������)�"8�"8�8�<�G�	140�	�#�#�L�1��}�}�T�!�"�X�.����4�� � �T�Y�Y��O�O�F�E�Y�K�O�P���9�n�-�-�*��"�"�D�3141�3142�!"��4=�4J�4J�0��U��4�!5�!5�k�!B�C�C�()�%���~�~���1�4�T�H�<N�{�m�\I�I���
5K�!���'�'��0����:�+�+�-�K�D�%�,�e�4�H�T�N�.����S$�	)�#�C�(�(��	)�s�J1�1143K�;K�Kc��SHyn[URU5nUcM[U[5(dM5UR	S5Vs/sHo3R5PM nn[
URX5 M{ gs snf)z�Set final values for all the options on the Distribution144instance, analogous to the .finalize_options() method of Command145objects.146�rOrMN�,)r`r^r'r(r��stripr\)rr�r/�elms    r3r~�Distribution.finalize_options{sj��147.�D��D�M�M�4�0�E��}���%��%�%�05���C�0@�A�0@�����0@��A���
�
�t�3�
.��148Bs�Bc�d�SSKJn SSKJn U(a]U(aUR	5nOUR149nUR
U5 URURS-5 [5 U(a6UR
UR5 URS5 [5 UH�n[U[5(a[X�5(aUn	OURU5n	[U	S5(aQ[U	R ["5(a2UR
U	R$['U	R 5-5 OUR
U	R$5 URSU	R(S35 [5 M� [U"UR*55 g	)150aShow help for the setup script command-line in the form of151several lists of command-line options.  'parser' should be a152FancyGetopt instance; do not expect it to be returned in the153same state, as its option table will be reset to make it154generate the correct help text.155 156If 'global_options' is true, lists the global options:157--verbose, --dry-run, etc.  If 'display_options' is true, lists158the "display-only" options: --name, --version, etc.  Finally,159lists per-command help for every command name or command class160in 'commands'.161rr ��	gen_usagez162Global options:zKInformation display options (just display information, ignore any commands)r�z
Options for 'r�N)r�r!�distutils.corerr�r?r�163print_helpr@�printrSr'r*r�r�r{r�r)r�r�r+rc)164rr�r?rSr�r!rrYr��klasss165          r3r��Distribution._show_help�sO�� 	*�,����4�4�6���-�-���#�#�G�,����d�/�/�2E�E�F��G���#�#�D�$8�$8�9����]�
�
�G��G��'�4�(�(�Z��-I�-I����.�.�w�7���u�n�-�-�*�U�=O�=O�QU�2V�2V��'�'��&�&�)9�%�:L�:L�)M�M���'�'��(:�(:�;����
�e�n�n�-=�Z�H�I��G� �	�i��(�(�)�*r5c�,�SSKJn UR(a6UR5 [	5 [	U"UR16655 gSn[
5nURHnURUS5 M UH�upgU(dMXd;dM[U5n[URSU-5"5nUS;a[	SRU55 O,US;a[	SRU55 O[	U5 SnM� U$)	z�If there were any non-global "display-only" options167(--help-commands or the metadata display options) on the command168line, display the requested info and return true; else return169false.170rrrrWr
r)rNrPrQrRr�)
rr�
help_commands�print_commandsrrc�setrS�addrr`r^r�)	rr�r�any_display_options�is_display_option�optionr�r�r/s	         r3r��#Distribution.handle_display_options�s���	-�171������!��G��)�D�,�,�-�.��172 ���E���*�*�F��!�!�&��)�,�+�%�H�C��s�s�/�'��,����
�
�v��|�<�>���3�3��#�(�(�5�/�*��P�P��$�)�)�E�*�+��%�L�&'�#�%�#�"r5c��[US-5 UHXnURRU5nU(dURU5nURn[SUSU3SU35 MZ g![173a SnN(f=f)zJPrint a subset of the list of all commands -- used by174'print_commands()'.175�:�(no description available)r��<N)rrarvr�rL�AttributeError)rr�r��176max_length�cmdrrLs       r3�print_command_list�Distribution.print_command_list�s���	�f�s�l���C��M�M�%�%�c�*�E���.�.�s�3��
;�#�/�/��
�B�s�1�Z�L�.�)��K�=�9�:���"�
;�:��
;�s�A.�.A=�<A=c�|�SSKnURRn[U5nURR5Vs/sHoDU;dM177UPM nnSnX%-Hn[
U5U:�dM[
U5nM! URUSU5 U(a[5 URUSU5 ggs snf)a>Print out a help message listing all available commands with a178description of each.  The list is divided into "standard commands"179(listed in distutils.command.__all__) and "extra commands"180(mentioned in self.cmdclass, but not a standard command).  The181descriptions come from the command class attribute182'description'.183rNzStandard commandszExtra commands)	�distutils.commandr��__all__rrar�r�r*r)rr��std_commands�is_stdr)�extra_commandsr(s       r3r�Distribution.print_commands�s���	!� �(�(�0�0���\�"��)-���);�);�)=�S�)=�#�F�AR�#�)=��S��184��0�C��3�x�*�$� ��X�185�1�	
����.A�:�N���G��#�#�N�4D�j�Q���Ts�	B9�B9c��SSKnURRn[U5nURR5Vs/sHoDU;dM186UPM nn/nX%-HUnURR
U5nU(dURU5nURnURXH45 MW U$s snf![a SnN+f=f)aGet a list of (command, description) tuples.187The list is divided into "standard commands" (listed in188distutils.command.__all__) and "extra commands" (mentioned in189self.cmdclass, but not a standard command).  The descriptions come190from the command class attribute 'description'.191rNr%)r-r�r.rrar�rvr�rLr'r�)	rr�r/r0r)r1�rvrrLs	         r3�get_command_list�Distribution.get_command_lists���	!� �(�(�0�0���\�"��)-���);�);�)=�S�)=�#�F�AR�#�)=��S�
���0�C��M�M�%�%�c�*�E���.�.�s�3��
;�#�/�/��
�I�I�s�(�)�1��	��T��"�
;�:��
;�s�	B8�B8�B=�=C�Cc��URn[U[5(dYUcSnURS5Vs/sHo"S:wdM192UR	5PM nnSU;aURSS5 XlU$s snf)z9Return a list of packages from which commands are loaded.rXrzdistutils.commandr)rbr'r)r�r�insert)r�pkgs�pkgs   r3�get_command_packages�!Distribution.get_command_packages*st���$�$���$��%�%��|���+/�:�:�c�?�H�?�C�R�i�K�C�I�I�K�?�D�H�"�$�.����A�2�3�$(�!����	Is�	A=�A=c��URRU5nU(aU$UR5HGnUSU3nUn[U5 [R193Un[Xe5nX RU'Us $ [SUS35e![a Mgf=f![a [SUSUSUS35ef=f)a'Return the class that implements the Distutils command named by194'command'.  First we check the 'cmdclass' dictionary; if the195command is mentioned there, we fetch the class object from the196dictionary and return it.  Otherwise we load the command module197("distutils.command." + command) and fetch the command class from198the module.  The loaded class is also stored in 'cmdclass'199to speed future calls to 'get_command_class()'.200 201Raises DistutilsModuleError if the expected module could not be202found, or if that module does not define the expected class.203r�zinvalid command 'z
' (no class 'z
' in module 'z')r�)204rarvr;�205__import__r�r��ImportErrorr`r'r)rr�r�pkgname�module_name�206klass_name�modules       r3r��Distribution.get_command_class6s����
�
�!�!�'�*����L��0�0�2�G�$�I�Q�w�i�0�K� �J�
��;�'����[�1��
���3��&+�M�M�'�"��L�%3�(#�%6�w�i�q�#A�B�B���
��
��207"�
�*�'��y�
�j�\��Wb�Vc�ce�f���
�s�B�!B �208B�B�  Cc��g�Nr&�rr��creates   r3�get_command_obj�Distribution.get_command_obj\���r5c��grFr&rGs   r3rIrJ`s��r5�boolc�j�URRU5nU(d�U(a�[(aURSUS35 UR	U5nU"U5=o0RU'SUR209U'URRU5nU(aURX55 U$)z�Return the command object for 'command'.  Normally this object210is cached on a previous call to 'get_command_obj()'; if no command211object for 'command' is in the cache, then we either create and212return it (if 'create' is true) or return None.213z*Distribution.get_command_obj(): creating 'z' command objectF)rtrvrr�r�rure�_set_command_options)rr�rH�cmd_objrrYs      r3rIrJds����"�"�&�&�w�/���6��u��
�
�!�!(�	�)9�;��214�*�*�7�3�E�27��+�=�G�&�&�w�/�%*�D�M�M�'�"��*�*�.�.�w�7�G���)�)�'�;��r5c215�"�UR5nUcURU5n[(aURSUS35 UR	5H�unupV[(aURSUSUSUS35 UR216Vs/sHn[
U5PM nnURn	[U[5n217XI;a&U218(a[XU[U5(+5 M�XH;aU219(a[X[U55 M�[X5(a[XU5 M�[SUS	US220US35e gs snf![a /nN�f=f![a 0n	N�f=f![an[U5eSnAff=f)aISet the options for 'command_obj' from 'option_dict'.  Basically221this means copying elements of a dictionary ('option_dict') to222attributes of an instance ('command').223 224'command_obj' must be a Command instance.  If 'option_dict' is not225supplied, uses the standard option dictionary for this command226(from 'self.command_options').227Nz  setting options for 'r�z    z = z (from �)z	error in z: command 'z' has no such option 'r�)�get_command_namerxrr�rw�boolean_optionsrr'rUr'r(r\rr{rr�)rrt�option_dict�command_namer!�sourcer/�o�	bool_opts�neg_opt�	is_stringr2s            r3rO�!Distribution._set_command_options�s���#�3�3�5�����.�.�|�<�K��5��M�M�3�L�>��L�M�'2�'8�'8�':�#�F�O�V��u��
�
��V�H�C��w�g�f�X�Q�G�H�
�;F�;V�;V�W�;V�a�.�q�1�;V�	�W�
�%�2�2��

0�&�u�c�2�	��$���K���i��>N�:N�O��(�Y��K��5�1A�B��[�1�1��K��7�.�#�F�8�;�|�n�DZ�[a�Zb�bc�d���+(;��X��!�
��	�
��"�
���
���
0�*�3�/�/��
0�s`�E�E�'E�*E"�79E4�2!E4�E4�3E4�E�E�E�"E1�0E1�4228F�>F	�	Fc��grFr&�rr��reinit_subcommandss   r3�reinitialize_command�!Distribution.reinitialize_command�rKr5c��grFr&r^s   r3r`ra�s��r5c�l�SSKJn [X5(dUnURU5nOUR	5nUR229(dU$UR
5 SUlSURU'URU5 U(a(UR5HnURXR5 M U$)a;Reinitializes a command to the state it was in when first230returned by 'get_command_obj()': ie., initialized but not yet231finalized.  This provides the opportunity to sneak option232values in programmatically, overriding or supplementing233user-supplied values from the config files and command line.234You'll have to re-finalize the command object (by calling235'finalize_options()' or 'ensure_finalized()') before using it for236real.237 238'command' should be a command name (string) or command object.  If239'reinit_subcommands' is true, also reinitializes the command's240sub-commands, as declared by the 'sub_commands' class attribute (if241it has one).  See the "install" command for an example.  Only242reinitializes the sub-commands that actually matter, ie. those243whose test predicates return true.244 245Returns the reinitialized command object.246rr F)r�r!r'rIrS�	finalized�initialize_optionsrurO�get_sub_commandsr`)rr�r_r!rV�subs      r3r`ra�s���*	*��'�+�+�"�L��*�*�<�8�G�"�3�3�5�L�� � ��N��"�"�$�!���&+��
�
�l�#��!�!�'�*���/�/�1���)�)�#�B�2��r5c�0�[R"X!5 grFr)rr2�levels   r3r��Distribution.announce�s������r5c�L�URHnURU5 M g)z�Run each command that was seen on the setup script command line.247Uses the list of commands found and cache of command objects248created by 'get_command_obj()'.249N)r��run_command)rr)s  r3�run_commands�Distribution.run_commands�s ��250�=�=�C����S�!�!r5c���URRU5(ag[R"SU5 UR	U5nUR5 UR
5 SURU'g)azDo whatever it takes to run a command (including nothing at all,251if the command has already been run).  Specifically: if we have252already created and run the command named by 'command', return253silently without doing anything.  If the command named by 'command'254doesn't even have a command object yet, create one.  Then invoke255'run()' on that command object (or an existing one).256Nz257running %sT)rurvr�inforI�ensure_finalized�run)rr�rPs   r3rl�Distribution.run_command�s]���=�=���W�%�%������w�'��&�&�w�/��� � �"����
�!%��
�
�g�r5c�j�[UR=(d UR=(d /5S:�$�Nr)r�rgrjr�s r3�has_pure_modules�Distribution.has_pure_moduless$���4�=�=�9�D�O�O�9�r�:�Q�>�>r5c�X�UR=(a [UR5S:�$ru)rmr�r�s r3�has_ext_modules�Distribution.has_ext_moduless#�����=�C��(8�(8�$9�A�$=�=r5c�X�UR=(a [UR5S:�$ru)rkr�r�s r3�has_c_libraries�Distribution.has_c_librariess���~�~�9�#�d�n�n�"5��"9�9r5c�P�UR5=(d UR5$rF)rvryr�s r3�has_modules�Distribution.has_modules	s���$�$�&�@�$�*>�*>�*@�@r5c�X�UR=(a [UR5S:�$ru)rlr�r�s r3�has_headers�Distribution.has_headers����|�|�5��D�L�L� 1�A� 5�5r5c�X�UR=(a [UR5S:�$ru)rqr�r�s r3�has_scripts�Distribution.has_scriptsr�r5c�X�UR=(a [UR5S:�$ru)rrr�r�s r3�has_data_files�Distribution.has_data_filess�����;�3�t���#7�!�#;�;r5c��UR5=(a1 UR5(+=(a UR5(+$rF)rvryr|r�s r3�is_pure�Distribution.is_pures;���!�!�#�
+��(�(�*�*�
+��(�(�*�*�	258r5c�r�URRUlURRUlURRUlURRUlURR259UlURRUlURRUlURRUlURRUl	URRUl260URRUlURRUlURRUl
URRUlURRUlURR UlURR"UlURR$UlURR&UlURR(UlURR*UlgrF)r^�get_name�get_version�get_fullname�261get_author�get_author_email�get_maintainer�get_maintainer_email�get_contact�get_contact_email�get_url�get_license�get_licence�get_description�get_long_description�get_keywords�
get_platforms�get_classifiers�get_download_url�get_requires�get_provides�
get_obsoletesr�s r3r��Distribution._$sy�� �M�M�2�2�D�M�#�}�}�8�8�D�� $�
�
� :� :�D��"�m�m�6�6�D�O�$(�M�M�$B�$B�D�!�"&�-�-�">�">�D��(,�
�
�(J�(J�D�%�#�}�}�8�8�D��%)�]�]�%D�%D�D�"��=�=�0�0�D�L�#�}�}�8�8�D��#�}�}�8�8�D��#'�=�=�#@�#@�D� �(,�
�
�(J�(J�D�%� $�
�
� :� :�D��!%���!<�!<�D��#'�=�=�#@�#@�D� �$(�M�M�$B�$B�D�!� $�
�
� :� :�D�� $�
�
� :� :�D��!%���!<�!<�D�r5rzstr | Literal[False]rArBrDrE�author_emailrG�maintainer_emailrH�
contact_emailrIrJrKrL�long_descriptionz str | list[str] | Literal[False]rMrNrOzlist[str] | Literal[False]rPrQrR)/rartrerbr�rrrfrmrnrpr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rurlr=rorkr^rhrirgrsrjrdrcrqr9r|rF)r�zMutableMapping[str, Any] | None�return�None)NNrX)r�r(r�r�)r�r�)TTr&)r�r)r�r(r�z
type[Command])T)r�r(rHz
Literal[True]r�r!)r�r(rHzLiteral[False]r��Command | None)r�r(rHrMr�r�)F)r�r(r_rMr�r!)r�r"r_rMr�r")r�z
str | Commandr�r!)ri�intr�r�)r�r(r�r�)r�rM)1r+�262__module__�__qualname__�__firstlineno__�__doc__r?�__annotations__r@rSrrTrUr�rxr�r�r�r�r�r�r�r~r�r�r*rr5r;r�rrIrOr`r��INFOr�rmrlrvryr|rr�r�r�r�rr��__static_attributes__)�.0�xrs000r3r7r7Ms����*.�N�*��#�L�-��/�O�+��8*9�1�)8�A��!�A�$���1��-��263/6�y�-A�L�*�A�264Z �x	�8�4�.?�&@4�HA�F265�`�D4�WY�1+�KS�1+�f%#�N;�"R�2�<266�$C�L�48����$1��	��������$2��	�����:(0�T�7<����04��	�����=B�� ��6:��	����:?�(�$�(�	�(�X*1����"�&�(?�>�:�A�6�6�<�267��	=�0��"�"�%�%�&�&�$�$�*�*�(�(�.�.�%�%�+�+�
!�!�%�%�%�%�)�)�.�.�3�3�5�5�2�2�,�,�,�,�-�-�]��g1s�F;r7c�r�\rSrSrSrSrS&S'SjjrS(SjrS)SjrS*Sjr	S	r268S+S269jrS+SjrS+Sjr
\S,S
j5rS-SjrS-SjrS-SjrS-SjrS-SjrS-SjrS-SjrS-Sjr\rS-SjrS-SjrS.SjrS/SjrS0SjrS/SjrS.SjrS/Sjr S-Sjr!S.Sjr"S1S jr#S.S!jr$S1S"jr%S.S#jr&S1S$jr'S%r(g)2r]iSzUDummy class to hold the distribution meta-data: name, version,270author, and so forth.271)rArBrEr�rGr�rIrJrLr�rOrMrDrHr�rN�download_urlrPrQrRNc�.�UbUR[U55 gSUlSUlSUlSUlSUlSUlSUlSUl	SUl272SUlSUlSUl
SUlSUlSUlSUlSUlgrF)�
read_pkg_file�openrArBrEr�rGr�rIrJrLr�rOrMrNr�rPrQrR)rr�s  r3r��DistributionMetadata.__init__ps��������t�D�z�*�$(�D�I�'+�D�L�&*�D�K�,0�D��*.�D�O�04�D�!�#'�D�H�'+�D�L�+/�D��04�D�!�48�D�M�59�D�N�7;�D��,0�D��48�D�M�48�D�M�59�D�Nr5c�|^�[U5mSU4SjjnU4SjnTSnU"S5UlU"S5UlU"S5UlU"S5UlSUlU"S	5UlSUlU"S2735UlU"S5Ul	ST;aU"S5Ul274OSUl275U"S
5UlU"S5UlST;aU"S5RS5Ul
U"S5UlU"S5UlUS:Xa(U"S5UlU"S5UlU"S5UlgSUlSUlSUlg)z-Reads the metadata values from a file object.rAc�.>�TUnU(aUS:waU$g�N�UNKNOWNr&)rAr/r2s  �r3�_read_field�7DistributionMetadata.read_pkg_file.<locals>._read_field�s�����I�E���)�+���r5c�:>�TRUS5nU/:XagU$rF)�get_all)rA�valuesr2s  �r3�276_read_list�6DistributionMetadata.read_pkg_file.<locals>._read_list�s"����[�[��t�,�F���|���Mr5zmetadata-versionrB�summaryrENrFz	home-pagerJzdownload-urlrLrOr�platform�277classifier�1.1rQrPrR)rAr(r��278str | None)rrArBrLrErGr�r�rIrJr�r�r�rOrMrNrQrPrR)r�filer�r��metadata_versionr2s     @r3r��"DistributionMetadata.read_pkg_file�s<�����%��	�	��1�2����'��	�"�9�-���&�y�1���!�(�+������'��7��� $����{�+���"�9�-����S� � +�N� ;�D�� $�D�� +�M� :���&�y�1������'�279�3�9�9�#�>�D�M�#�J�/���%�l�3����u�$�&�z�2�D�M�&�z�2�D�M�'��4�D�N� �D�M� �D�M�!�D�Nr5c��[[RRUS5SSS9nUR	U5 SSS5 g!,(df   g=f)z.Write the PKG-INFO file into the release tree.zPKG-INFO�wzUTF-8r�N)r�r�r�r��write_pkg_file)r�base_dir�pkg_infos   r3�write_pkg_info�#DistributionMetadata.write_pkg_info�sA��
��G�G�L�L��:�.��g�280�
�����)�281�282�283�s�A�284Ac�n^�SnUR(dDUR(d3UR(d"UR(dUR(aSnTRSUS35 TRSUR
5S35 TRSUR5S35 U4SjnU"SUR55 U"S	UR55 U"S285UR55 U"SUR55 U"SUR55 U"S
UR5 U"S[UR5=(d S55 U"SSRUR!555 UR#TSUR%55 UR#TSUR'55 UR#TSUR)55 UR#TSUR+55 UR#TSUR-55 g)z0Write the PKG-INFO format data to a file object.z1.0r�zMetadata-Version: r�zName: z	Version: c�D>�U(aTRUSUS35 gg�Nz: r���write)r�r�r�s  �r3�maybe_write�8DistributionMetadata.write_pkg_file.<locals>.maybe_write�s$�����286�287�f�X�R��u�B�/�0�r5�Summaryz	Home-page�AuthorzAuthor-email�LicensezDownload-URL�DescriptionrX�Keywordsr�Platform�288Classifier�Requires�Provides�	ObsoletesN)rPrQrRrNr�r�r�r�r�r�r�r�r�rr�r�r��_write_listr�r�r�r�r�)rr�rBr�s `  r3r��#DistributionMetadata.write_pkg_file�s�������M�M��}�}��~�~����� � ��G�	
�289�290�'��y��3�4��291�292�V�D�M�M�O�,�B�/�0��293�294�Y�t�/�/�1�2�"�5�6�	1�295	�I�t�3�3�5�6��K�����0��H�d�.�.�0�1��N�D�$:�$:�$<�=��I�t�/�/�1�2��N�D�$5�$5�6��M�=��1J�1J�1L�1R�PR�#S�T��J�����):�):�)<� =�>�����z�4�+=�+=�+?�@�����|�T�-A�-A�-C�D�	
����z�4�+<�+<�+>�?�����z�4�+<�+<�+>�?�����{�D�,>�,>�,@�Ar5c�Z�U=(d /nUHnURUSUS35 M gr�r�)rr�rAr�r/s     r3r�� DistributionMetadata._write_list�s.����2���E��J�J�$��r�%���+�,�r5c�,�UR=(d S$r�)rAr�s r3r��DistributionMetadata.get_name�s���y�y�%�I�%r5c�,�UR=(d S$)Nz0.0.0)rBr�s r3r�� DistributionMetadata.get_version�s���|�|�&�w�&r5c�^�URUR5UR55$rF)�	_fullnamer�r�r�s r3r��!DistributionMetadata.get_fullname�s"���~�~�d�m�m�o�t�/?�/?�/A�B�Br5c�h�SR[U5RSS5[USS95$)a�296>>> DistributionMetadata._fullname('setup.tools', '1.0-2')297'setup_tools-1.0.post2'298>>> DistributionMetadata._fullname('setup-tools', '1.2post2')299'setup_tools-1.2.post2'300>>> DistributionMetadata._fullname('setup-tools', '1.0-r2')301'setup_tools-1.0.post2'302>>> DistributionMetadata._fullname('setup.tools', '1.0.post')303'setup_tools-1.0.post0'304>>> DistributionMetadata._fullname('setup.tools', '1.0+ubuntu-1')305'setup_tools-1.0+ubuntu.1'306z{}-{}r[r�F)�strip_trailing_zero)r,rr�r)rArBs  r3r��DistributionMetadata._fullname�s4���~�~��d�#�+�+�C��5� ��e�D�307�	308r5c��UR$rF)rEr�s r3r��DistributionMetadata.get_authors���{�{�r5c��UR$rF)r�r�s r3r��%DistributionMetadata.get_author_email���� � � r5c��UR$rF)rGr�s r3r��#DistributionMetadata.get_maintainers�����r5c��UR$rF)r�r�s r3r��)DistributionMetadata.get_maintainer_email����$�$�$r5c�@�UR=(d UR$rF)rGrEr�s r3r�� DistributionMetadata.get_contacts�����-�$�+�+�-r5c�@�UR=(d UR$rF)r�r�r�s r3r��&DistributionMetadata.get_contact_emails���$�$�9��(9�(9�9r5c��UR$rF)rIr�s r3r��DistributionMetadata.get_url s���x�x�r5c��UR$rF)rJr�s r3r�� DistributionMetadata.get_license#s���|�|�r5c��UR$rF)rLr�s r3r��$DistributionMetadata.get_description(s�����r5c��UR$rF)r�r�s r3r��)DistributionMetadata.get_long_description+r�r5c�,�UR=(d /$rF)rOr�s r3r��!DistributionMetadata.get_keywords.����}�}�"��"r5c�&�[US5Ulg)NrO)r4rO�rr/s  r3�set_keywords�!DistributionMetadata.set_keywords1s��$�U�J�7��
r5c��UR$rF)rMr�s r3r��"DistributionMetadata.get_platforms4s���~�~�r5c�&�[US5Ulg)NrM)r4rMrs  r3�
set_platforms�"DistributionMetadata.set_platforms7s��%�e�[�9��r5c�,�UR=(d /$rF)rNr�s r3r��$DistributionMetadata.get_classifiers:s�����%�2�%r5c�&�[US5Ulg)NrN)r4rNrs  r3�set_classifiers�$DistributionMetadata.set_classifiers=s��'��}�=��r5c��UR$rF)r�r�s r3r��%DistributionMetadata.get_download_url@r�r5c�,�UR=(d /$rF)rQr�s r3r��!DistributionMetadata.get_requiresDr
r5c�t�SSKnUHnURRU5 M  [U5Ulgru)�distutils.versionpredicate�versionpredicate�VersionPredicater)rQ�rr/r�r:s    r3�set_requires�!DistributionMetadata.set_requiresGs.��)��A��&�&�7�7��:���U���
r5c�,�UR=(d /$rF)rPr�s r3r��!DistributionMetadata.get_providesNr
r5c��UVs/sHo"R5PM nnUH"nSSKnURRU5 M$ Xlgs snfru)rr!r"�split_provisionrP)rr/r:r�s    r3�set_provides�!DistributionMetadata.set_providesQsG��$)�*�E�q����E��*��A�-��&�&�6�6�q�9���
��+s�Ac�,�UR=(d /$rF)rRr�s r3r��"DistributionMetadata.get_obsoletesYs���~�~�#��#r5c�t�SSKnUHnURRU5 M  [U5Ulgru)r!r"r#r)rRr$s    r3�
set_obsoletes�"DistributionMetadata.set_obsoletes\s.��)��A��&�&�7�7��:���e���r5)rEr�rNrLr�rOrJr�rGr�rArRrMrPrQrIrBrF)r�z:str | bytes | os.PathLike[str] | os.PathLike[bytes] | Noner�r�)r�zIO[str]r�r�)r�zstr | os.PathLike[str]r�r�)r�zSupportsWrite[str]r�r�)r�r()rAr(rBr(r�r()r�r�)r��str | list[str])r/�str | Iterable[str]r�r�)r�zstr | list[str] | None)r/z
Iterable[str]r�r�))r+r�r�r�r�r_r�r�r�r�r�r�r�r��staticmethodr�r�r�r�r�r�r�r�r�r�r�r�r�rr�rr�rr�r�r%r�r+r�r0r�r&r5r3r]r]Ss������2RV�:�N�:�	
�:�22"�h*�%B�N-�&�'�C��309��310�$�!��%�.�:����K� �%�#�8��:�&�>�!�#�$�#��$�%r5r]c�6�UVs/sHoSSPM	 sn$s snf)zwConvert a 4-tuple 'help_options' list as found in various command311classes to the 3-tuple form required by FancyGetopt.312r�r&)rYr�s  r3r�r�ds ��!(�(����!�H��(�(��(s�)r/r3r�r2)>r��313__future__rr�r�r�r��rer�ry�collections.abcrr�emailr�typingrrr	r314rrr
r�packaging.utilsrr�_logr�debugr�errorsrrrr�fancy_getoptrr�utilrrr�	_typeshedr�typing_extensionsrr)r!r"r)�tupler(r�r$r��compiler�r4r7r]r�r&r5r3�<module>rFs����#���	��	�315��4�#�	�	�	�D�����9�9�9��'�+���K�y�1�	��	�%��U�3��9�%�s�C�/�3160�%��U�3��9�=M�s�8R�2S�317S�T���i���Z�Z�4�
5�318��C.�C.�L N%�N%�b)r5
codekingpro/portable-devtools · Team Ai