Team Ai
Datasetpublic

codekingpro/portable-devtools

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

2`j1%�	�|�SrSSKJr SSKrSSKrSSKrSSKJr SSKJ	r	 SSK3JrJrJ
r
 \RR\RR!\RR#\RR#\55SS5=r\R;\/-5 \R(R+S	S5 SSKrS4SKJrJr S5SKJr S6S
KJrJr S7SK J!r! S8SK"J#r# S9SK$J%r% S10SK&J'r' SSK(r)/SQr*\"SSS9r+Sr,\RZr.\RZr/Sr0S Sjr1S!Sjr2\)RfRdR\2l\(aSSK(J4r5 O&\Rl"\)RfRh5r5"SS\55r4Sr7\Rp4Sjr9"SS\:5r;\Rx"5 g)"z@Extensions to the 'distutils' for large or complex distributions�)�annotationsN)�abstractmethod)�Mapping)�
TYPE_CHECKING�TypeVar�overload�11setuptools�_vendor�	backports�)�logging�monkey)�Require)�
PackageFinder�PEP420PackageFinder)�Distribution)�	Extension)�__version__)�SetuptoolsDeprecationWarning)�setupr�Commandrrr�
find_packages�find_namespace_packages�	_CommandT�_Command)�boundc��"SS[RR5nU"U5nURSS9 UR(a[U5 gg)Nc�F^�\rSrSrSrSU4SjjrSU4SjjrSrSrU=r	$)	�4_install_setup_requires.<locals>.MinimalDistribution�7zT12A minimal version of a distribution for supporting the13fetch_build_eggs interface.14c�>�Sn[U5[U5-Vs0sHo3X_M	 nn[TU]	U5 URR	5 gs snf)N)�dependency_links�setup_requires)�set�super�__init__�set_defaults�_disable)�self�attrs�_incl�k�filtered�	__class__s     ��ED:\code\apps\devtools\python\Lib\site-packages\setuptools/__init__.pyr&�=_install_setup_requires.<locals>.MinimalDistribution.__init__=sT���8�E�-0��Z�#�e�*�-D�E�-D��5�8��-D�H�E��G��X�&����&�&�(��Fs�Ac�X>�[TU]U5up#US4$![a US4s$f=f)zAIgnore ``pyproject.toml``, they are not related to setup_requires�)r%� _split_standard_project_metadata�	Exception)r)�	filenames�cfg�_tomlr.s    �r/�_get_project_config_files�N_install_setup_requires.<locals>.MinimalDistribution._get_project_config_filesDs?���
%�"�W�E�i�P�15����7�N���
%� �"�}�$�
%�s��)�)c��g)zH16Disable finalize_options to avoid building the working set.17Ref #2158.18Nr2�r)s r/�finalize_options�E_install_setup_requires.<locals>.MinimalDistribution.finalize_optionsLs��r2)r*zMapping[str, object]�return�None�N)19�__name__�20__module__�__qualname__�__firstlineno__�__doc__r&r8r<�__static_attributes__�
__classcell__�r.s@r/�MinimalDistributionr7s���	�21	)�	�	�	r>rJT)�ignore_option_errors)�	distutils�corer�parse_config_filesr#�_fetch_build_eggs)r*rJ�dists   r/�_install_setup_requiresrQ4sM���i�n�n�9�9��6�u�%�D�	�����6�����$��r>c�22�URUR5 g![aZnSnSURR;a8[US5(aUR
U5 eURSUS35 eSnAff=f)Na�23        It is possible a package already installed in your system24        contains an version that is invalid according to PEP 440.25        You can try `pip install --use-pep517` as a workaround for this problem,26        or rely on a new virtual environment.27 28        If the problem refers to a package that is not installed yet,29        please contact that package's maintainers or distributors.30        �InvalidVersion�add_note�31)�fetch_build_eggsr#r4r.rB�hasattrrT�announce)rP�ex�msgs   r/rOrOZs}������d�1�1�2�������r�|�|�4�4�4��r�:�&�&����C� �	��
�
��3�%�r�l�+�
���s��32B�AA=�=Bc��[R"5 [U5 [RR33"S0UD6$)Nr2)r
�	configurerQrLrMr)r*s r/rros0�������E�"��>�>���(�%�(�(r>)rc��^�\rSrSr%SrSrS\S'SrSU4Sjjr\	SSSjj5r34\	SSSjj5r35SSS	jjr36\SS37j5r\SSj5r
\SSj5rS
rU=r$)r�a�38Setuptools internal actions are organized using a *command design pattern*.39This means that each action (or group of closely related actions) executed during40the build should be implemented as a ``Command`` subclass.41 42These commands are abstractions and do not necessarily correspond to a command that43can (or should) be executed via a terminal, in a CLI fashion (although historically44they would).45 46When creating a new command from scratch, custom defined classes **SHOULD** inherit47from ``setuptools.Command`` and implement a few mandatory methods.48Between these mandatory methods, are listed:49:meth:`initialize_options`, :meth:`finalize_options` and :meth:`run`.50 51A useful analogy for command classes is to think of them as subroutines with local52variables called "options".  The options are "declared" in :meth:`initialize_options`53and "defined" (given their final values, aka "finalized") in :meth:`finalize_options`,54both of which must be defined by every command class. The "body" of the subroutine,55(where it does all the work) is the :meth:`run` method.56Between :meth:`initialize_options` and :meth:`finalize_options`, ``setuptools`` may set57the values for options/attributes based on user's input (or circumstance),58which means that the implementation should be careful to not overwrite values in59:meth:`finalize_options` unless necessary.60 61Please note that other commands (or other parts of setuptools) may also overwrite62the values of the command's options/attributes multiple times during the build63process.64Therefore it is important to consistently implement :meth:`initialize_options` and65:meth:`finalize_options`. For example, all derived attributes (or attributes that66depend on the value of other attributes) **SHOULD** be recomputed in67:meth:`finalize_options`.68 69When overwriting existing commands, custom defined classes **MUST** abide by the70same APIs implemented by the original class. They also **SHOULD** inherit from the71original class.72Fr�distributionc�X>�[TU]U5 [U5RU5 g)zR73Construct the command for dist, updating74vars(self) with any keyword parameters.75N)r%r&�vars�update)r)rP�kwr.s   �r/r&�Command.__init__�s$���76	������T�77���"�r>c��grAr2�r)�command�reinit_subcommandsrcs    r/�reinitialize_command�Command.reinitialize_command�s��r>c��grAr2rfs    r/rirj�s��r>c�h�[R"XU5n[U5RU5 U$rA)rrirarb)r)rgrhrc�cmds     r/rirj�s.���+�+�D�;M�N���S�	������78r>c��[e)z�79Set or (reset) all options/attributes/caches used by the command80to their default values. Note that these values may be overwritten during81the build.82��NotImplementedErrorr;s r/�initialize_options�Command.initialize_options��83��"�!r>c��[e)z�84Set final values for all options/attributes used by the command.85Most of the time, each option/attribute/cache should only be set if it does not86have any value yet (e.g. ``if self.attr is None: self.attr = val``).87ror;s r/r<�Command.finalize_options�rsr>c��[e)z�88Execute the actions intended by the command.89(Side effects **SHOULD** only take place when :meth:`run` is executed,90for example, creating new files or writing to the terminal output).91ror;s r/�run�Command.run�rsr>r2)rPrr?r@)F)rg�strrh�boolr?r)rgrrhrzr?r)rgzstr | _Commandrhrzr?zCommand | _Command)r?r@)rBrCrDrErF�command_consumes_arguments�__annotations__�dry_runr&rrirrqr<rwrGrHrIs@r/rr�s����#�J"'�����G��92��7<����04��	�����=B�� ��6:��	����CH��%��;?��	���"��"��"��"��"��"r>rc��S[R"USS95n[[RRU5$)z93Find all files under 'path'94c3�z# �UH1upnUH$n[RRX5v� M& M3 g7frA)�os�path�join)�.0�base�dirs�files�files     r/�	<genexpr>�#_find_all_simple.<locals>.<genexpr>�s9����!@��D���D�	�����T� � ��	!�!@�s�9;T)�followlinks)r��walk�filterr��isfile)r��resultss  r/�_find_all_simpler��s3���!#����4�!@��G�95�"�'�'�.�.�'�*�*r>c���[U5nU[R:Xa8[R"[R96RUS9n[X!5n[U5$)z�97Find all files under 'dir' and return the list of full filenames.98Unless dir is '.', return full filenames with dir prepended.99)�start)	r�r��curdir�	functools�partialr��relpath�map�list)�dirr��make_rels   r/�findallr��sH��100
�S�!�E�101�b�i�i���$�$�R�W�W�_�_�C�@���H�$����;�r>c��\rSrSrSrSrg)�sic��z;Treat this string as-is (https://en.wikipedia.org/wiki/Sic)r2N)rBrCrDrErFrGr2r>r/r�r��s��Er>r�)rPr)r?r)=rF�102__future__rr�r��sys�abcr�collections.abcr�typingrrrr��extendr��dirname�__file__�vendor_path�modules�pop�_distutils_hack.override�_distutils_hack�r
r�dependsr�	discoveryrrrPr�	extensionr�versionr�warningsr�distutils.corerL�__all__r�bootstrap_install_from�findrrrQrOrrMrr�
get_unpatchedr�r�r�ryr��	patch_allr2r>r/�<module>r�sx��F�#��	�103��#�3�3�����������b�g�g�o�o�b�g�g�o�o�h�>W�.X�Zf�hq�!r�r�+�{~�|D�|D�D�IT�HU�U�V�������T�"����9�� �/�2��	��
�K�z�2�	����"�"�
�-�2�2��# �L�*)����$�$�,�,��
��2��#�#�I�N�N�$:�$:�;�H�_"�h�_"�D	+��	�	�	�F�#�F�104���r>
codekingpro/portable-devtools · Team Ai