Ë
     täi1%  ã            	      óp  — d Z ddlmZ ddlZddlZddlZddlmZ ddlm	Z	 ddl
mZmZmZ ej                  j                  ej                  j!                  ej                  j#                  ej                  j#                  e«      «      dd«      xZej                  vegz  «       ej(                  j+                  d	d«       ddlZd
dlmZmZ d
dlmZ d
dlmZmZ d
dl m!Z! d
dl"m#Z# d
dl$m%Z% d
dl&m'Z' ddl(Z)g d¢Z* edd¬«      Z+dZ,ejZ                  Z.ejZ                  Z/d„ Z0d d„Z1d!d„Z2e)jf                  jd                  j                   e2_         erddl(m4Z5 n& ejl                  e)jf                  jh                  «      Z5 G d„ de5«      Z4d„ Z7ejp                  fd„Z9 G d„ de:«      Z; ejx                  «        y)"z@Extensions to the 'distutils' for large or complex distributionsé    )ÚannotationsN)Úabstractmethod)ÚMapping)ÚTYPE_CHECKINGÚTypeVarÚoverloadÚ
setuptoolsÚ_vendorÚ	backportsé   )ÚloggingÚmonkey)ÚRequire)ÚPackageFinderÚPEP420PackageFinder)ÚDistribution)Ú	Extension)Ú__version__)ÚSetuptoolsDeprecationWarning)Úsetupr   ÚCommandr   r   r   Úfind_packagesÚfind_namespace_packagesÚ	_CommandTÚ_Command)Úboundc                ó®   —  G d„ dt         j                  j                  «      } || «      }|j                  d¬«       |j                  rt        |«       y y )Nc                  ó6   ‡ — e Zd ZdZdˆ fd„Zdˆ fd„	Zd„ Zˆ xZS )ú4_install_setup_requires.<locals>.MinimalDistributionzl
        A minimal version of a distribution for supporting the
        fetch_build_eggs interface.
        c                ó¶   •— d}t        |«      t        |«      z  D �ci c]  }|||   “Œ
 }}t        ‰| �	  |«       | j                  j	                  «        y c c}w )N)Údependency_linksÚsetup_requires)ÚsetÚsuperÚ__init__Úset_defaultsÚ_disable)ÚselfÚattrsÚ_inclÚkÚfilteredÚ	__class__s        €úb/Volumes/fast/ai/experiments/MLX_z-image/.venv/lib/python3.12/site-packages/setuptools/__init__.pyr%   z=_install_setup_requires.<locals>.MinimalDistribution.__init__=   sX   ø€ Ø8ˆEÜ-0°«Z¼#¸e»*Ò-DÓEÑ-D¨˜˜5 ™8™Ð-DˆHÐEÜ‰GÑ˜XÔ&à×Ñ×&Ñ&Õ(ùò Fs   �Ac                óX   •— 	 t         ‰| �  |«      \  }}|dfS # t        $ r |dfcY S w xY w)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_fileszN_install_setup_requires.<locals>.MinimalDistribution._get_project_config_filesD   sA   ø€ ð%Ü"™WÑEÀiÓP‘
��Uð ˜�7ˆNøô ò %Ø  "�}Ò$ð%ús   ƒ ™)¨)c                 ó   — y)zl
            Disable finalize_options to avoid building the working set.
            Ref #2158.
            Nr0   ©r(   s    r.   Úfinalize_optionszE_install_setup_requires.<locals>.MinimalDistribution.finalize_optionsL   s   � ó    )r)   zMapping[str, object]ÚreturnÚNone©N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r%   r6   r9   Ú__classcell__©r-   s   @r.   ÚMinimalDistributionr   7   s   ø„ ñ	õ
	)õ	ö	r:   rD   T)Úignore_option_errors)Ú	distutilsÚcorer   Úparse_config_filesr"   Ú_fetch_build_eggs)r)   rD   Údists      r.   Ú_install_setup_requiresrK   4   sM   € ôœiŸn™n×9Ñ9ô ñ6 ˜uÓ%€Dð 	×Ñ°ÐÔ6Ø×ÒÜ˜$Õð r:   c                óú   — 	 | j                  | j                  «       y # t        $ rS}d}d|j                  j                  v r3t        |d«      r|j                  |«       ‚ | j                  d|› d�«       ‚ d }~ww xY w)Na–  
        It is possible a package already installed in your system
        contains an version that is invalid according to PEP 440.
        You can try `pip install --use-pep517` as a workaround for this problem,
        or rely on a new virtual environment.

        If the problem refers to a package that is not installed yet,
        please contact that package's maintainers or distributors.
        ÚInvalidVersionÚadd_noteÚ
)Úfetch_build_eggsr"   r2   r-   r>   ÚhasattrrN   Úannounce)rJ   ÚexÚmsgs      r.   rI   rI   Z   sz   € ðØ×Ñ˜d×1Ñ1Õ2øÜò ðˆð ˜rŸ|™|×4Ñ4Ñ4Ü�r˜:Ô&Ø—‘˜CÔ ð 	ð —‘  3 % r˜lÔ+Øûðús   ‚ ž	A:§AA5Á5A:c                 ó~   — t        j                  «        t        | «       t        j                  j
                  di | ¤ŽS )Nr0   )r   Ú	configurerK   rF   rG   r   )r)   s    r.   r   r   o   s0   € Ü×ÑÔä˜EÔ"ô �>‰>×ÑÑ( %Ñ(Ð(r:   )r   c                  óÆ   ‡ — e Zd ZU dZdZded<   dZ	 dˆ fd„Ze	 d	 	 	 	 	 dd„«       Z	e	 d	 	 	 	 	 dd„«       Z		 d	 	 	 	 	 dd„Z	e
dd	„«       Ze
dd
„«       Ze
dd„«       Zˆ xZS )r   a#  
    Setuptools internal actions are organized using a *command design pattern*.
    This means that each action (or group of closely related actions) executed during
    the build should be implemented as a ``Command`` subclass.

    These commands are abstractions and do not necessarily correspond to a command that
    can (or should) be executed via a terminal, in a CLI fashion (although historically
    they would).

    When creating a new command from scratch, custom defined classes **SHOULD** inherit
    from ``setuptools.Command`` and implement a few mandatory methods.
    Between these mandatory methods, are listed:
    :meth:`initialize_options`, :meth:`finalize_options` and :meth:`run`.

    A useful analogy for command classes is to think of them as subroutines with local
    variables called "options".  The options are "declared" in :meth:`initialize_options`
    and "defined" (given their final values, aka "finalized") in :meth:`finalize_options`,
    both of which must be defined by every command class. The "body" of the subroutine,
    (where it does all the work) is the :meth:`run` method.
    Between :meth:`initialize_options` and :meth:`finalize_options`, ``setuptools`` may set
    the values for options/attributes based on user's input (or circumstance),
    which means that the implementation should be careful to not overwrite values in
    :meth:`finalize_options` unless necessary.

    Please note that other commands (or other parts of setuptools) may also overwrite
    the values of the command's options/attributes multiple times during the build
    process.
    Therefore it is important to consistently implement :meth:`initialize_options` and
    :meth:`finalize_options`. For example, all derived attributes (or attributes that
    depend on the value of other attributes) **SHOULD** be recomputed in
    :meth:`finalize_options`.

    When overwriting existing commands, custom defined classes **MUST** abide by the
    same APIs implemented by the original class. They also **SHOULD** inherit from the
    original class.
    Fr   Údistributionc                óX   •— t         ‰| �  |«       t        | «      j                  |«       y)zj
        Construct the command for dist, updating
        vars(self) with any keyword parameters.
        N)r$   r%   ÚvarsÚupdate)r(   rJ   Úkwr-   s      €r.   r%   zCommand.__init__°   s$   ø€ ô
 	‰Ñ˜ÔÜˆT‹
×Ñ˜"Õr:   c                 ó   — y r=   r0   ©r(   ÚcommandÚreinit_subcommandsr\   s       r.   Úreinitialize_commandzCommand.reinitialize_command¸   s   € ð r:   c                 ó   — y r=   r0   r^   s       r.   ra   zCommand.reinitialize_command¼   s   € ð r:   c                óh   — t        j                  | ||«      }t        |«      j                  |«       |S r=   )r   ra   rZ   r[   )r(   r_   r`   r\   Úcmds        r.   ra   zCommand.reinitialize_commandÀ   s0   € ô ×+Ñ+¨D°'Ð;MÓNˆÜˆS‹	×Ñ˜ÔØˆ
r:   c                ó   — t         ‚)z·
        Set or (reset) all options/attributes/caches used by the command
        to their default values. Note that these values may be overwritten during
        the build.
        ©ÚNotImplementedErrorr8   s    r.   Úinitialize_optionszCommand.initialize_optionsÇ   ó
   € ô "Ð!r:   c                ó   — t         ‚)z÷
        Set final values for all options/attributes used by the command.
        Most of the time, each option/attribute/cache should only be set if it does not
        have any value yet (e.g. ``if self.attr is None: self.attr = val``).
        rf   r8   s    r.   r9   zCommand.finalize_optionsÐ   ri   r:   c                ó   — t         ‚)zÙ
        Execute the actions intended by the command.
        (Side effects **SHOULD** only take place when :meth:`run` is executed,
        for example, creating new files or writing to the terminal output).
        rf   r8   s    r.   ÚrunzCommand.runÙ   ri   r:   )rJ   r   r;   r<   )F)r_   Ústrr`   Úboolr;   r   )r_   r   r`   rn   r;   r   )r_   zstr | _Commandr`   rn   r;   zCommand | _Command)r;   r<   )r>   r?   r@   rA   Úcommand_consumes_argumentsÚ__annotations__Údry_runr%   r   ra   r   rh   r9   rl   rB   rC   s   @r.   r   r   �   sä   ø… ñ#ðJ "'ÐØÓà€Gðõ
ð à7<ðØðØ04ðà	òó ðð à=BðØ ðØ6:ðà	òó ðð CHðØ%ðØ;?ðà	óð ò"ó ð"ð ò"ó ð"ð ò"ó ô"r:   r   c                ó†   — d„ t        j                  | d¬«      D «       }t        t         j                  j                  |«      S )z%
    Find all files under 'path'
    c              3  ór   K  — | ]/  \  }}}|D ]$  }t         j                  j                  ||«      –— Œ& Œ1 y ­wr=   )ÚosÚpathÚjoin)Ú.0ÚbaseÚdirsÚfilesÚfiles        r.   Ú	<genexpr>z#_find_all_simple.<locals>.<genexpr>ç   s;   è ø€ ð á!@ÑˆD�$˜ÛˆDô 	�‰�‰�T˜4× àð 	!Ù!@ùs   ‚57T)Úfollowlinks)rt   ÚwalkÚfilterru   Úisfile)ru   Úresultss     r.   Ú_find_all_simpler‚   ã   s3   € ñä!#§¡¨¸4Õ!@ó€Gô
 ”"—'‘'—.‘. 'Ó*Ð*r:   c                óÊ   — t        | «      }| t        j                  k(  r;t        j                  t        j
                  j                  | ¬«      }t        ||«      }t        |«      S )zŒ
    Find all files under 'dir' and return the list of full filenames.
    Unless dir is '.', return full filenames with dir prepended.
    )Ústart)	r‚   rt   ÚcurdirÚ	functoolsÚpartialru   ÚrelpathÚmapÚlist)Údirrz   Úmake_rels      r.   Úfindallr�   ï   sJ   € ô
 ˜SÓ!€EØ
Œb�i‰iÒÜ×$Ñ$¤R§W¡W§_¡_¸CÔ@ˆÜ�H˜eÓ$ˆÜ�‹;Ðr:   c                  ó   — e Zd ZdZy)Úsicz;Treat this string as-is (https://en.wikipedia.org/wiki/Sic)N)r>   r?   r@   rA   r0   r:   r.   r�   r�   û   s   „ ÚEr:   r�   )rJ   r   )r;   r   )=rA   Ú
__future__r   r†   rt   ÚsysÚabcr   Úcollections.abcr   Útypingr   r   r   ru   Úextendrv   ÚdirnameÚ__file__Úvendor_pathÚmodulesÚpopÚ_distutils_hack.overrideÚ_distutils_hackÚ r   r   Údependsr   Ú	discoveryr   r   rJ   r   Ú	extensionr   Úversionr   Úwarningsr   Údistutils.corerF   Ú__all__r   Úbootstrap_install_fromÚfindr   r   rK   rI   r   rG   r   r   Úget_unpatchedr‚   r…   r�   rm   r�   Ú	patch_allr0   r:   r.   Ú<module>r©      s|  ðÙ Fõ #ã Û 	Û 
Ý Ý #ß 3Ñ 3à ‡�‡� §¡§¡¨b¯g©g¯o©o¸b¿g¹g¿o¹oÈhÓ>WÓ.XÐZfÐhqÓ!rÐr�+Ð{~÷  |Dñ  |Dð  Dð  ITð  HUñ  Uô  Và ‡�‡��˜TÔ "ã ç Ý ß 9Ý Ý  Ý /Ý 2ã ò	€ñ �K zÔ2€	àÐ à×"Ñ"€Ø-×2Ñ2Ð ò# óLó*)ð —‘×$Ñ$×,Ñ,€„áæ2à#ˆv×#Ñ# I§N¡N×$:Ñ$:Ó;€Hô_"ˆhô _"òD	+ð —	‘	ó 	ôFˆ#ô Fð
 €× Ñ Õ r:   