
    ϶vg(              	      *   d Z ddlmZ ddl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                            ej                            ej                            ej                            e                    dd          xZej        vegz             e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*ddl+m,Z, g dZ- edd          Z.dZ/ej0        Z1e j0        Z2d Z3d#dZ4d Z5e*j6        j5        j         e5_         erddl)m7Z8 n ej9        e*j6        j7                  Z8 G d de8          Z7d Z:ej;        fd Z< G d! d"e=          Z> ej?                     dS )$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)DistutilsOptionError)setupr   Commandr   r   r   find_packagesfind_namespace_packages	_CommandT_Command)boundc                     G d dt           j        j                  } ||           }|                    d           |j        rt          |           d S d S )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.
        attrsMapping[str, object]returnNonec                    d}fdt          |          t                    z  D             }t                                          |           | j                                         d S )N)dependency_linkssetup_requiresc                "    i | ]}||         S  r)   ).0kr!   s     P/var/www/pixelcanvas.ch/venv/lib/python3.11/site-packages/setuptools/__init__.py
<dictcomp>zQ_install_setup_requires.<locals>.MinimalDistribution.__init__.<locals>.<dictcomp>A   s    EEE58EEE    )setsuper__init__set_defaults_disable)selfr!   _inclfiltered	__class__s    `  r,   r1   z=_install_setup_requires.<locals>.MinimalDistribution.__init__?   sf    8EEEEESZZ#e**-DEEEHGGX&&&&&(((((r.   Nc                    	 t                                          |          \  }}n# t          $ r |dfcY S w xY w|dfS )zAIgnore ``pyproject.toml``, they are not related to setup_requiresr)   )r0    _split_standard_project_metadata	Exception)r4   	filenamescfg_tomlr7   s       r,   _get_project_config_fileszN_install_setup_requires.<locals>.MinimalDistribution._get_project_config_filesF   sY    %"WWEEiPP
UU % % % "}$$$%7Ns   $( 99c                    dS )zl
            Disable finalize_options to avoid building the working set.
            Ref #2158.
            Nr)   r4   s    r,   finalize_optionszE_install_setup_requires.<locals>.MinimalDistribution.finalize_optionsN   s      r.   )r!   r"   r#   r$   N)__name__
__module____qualname____doc__r1   r>   rA   __classcell__r7   s   @r,   MinimalDistributionr    9   st        	 	
	) 	) 	) 	) 	) 	)	 	 	 	 	 		 	 	 	 	 	 	r.   rI   T)ignore_option_errors)	distutilscorer   parse_config_filesr'   _fetch_build_eggs)r!   rI   dists      r,   _install_setup_requiresrP   6   s        in9   6 u%%D 	666  $   r.   rO   r   c                    	 |                      | j                   d S # t          $ rU}d}d|j        j        v r?t          |d          r|                    |           n|                     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'   r:   r7   rC   hasattrrS   announce)rO   exmsgs      r,   rN   rN   \   s    d122222    r|444r:&& ,C    l3lll+++s    
A=AA88A=c                 r    t          j                     t          |            t          j        j        di | S )Nr)   )r   	configurerP   rK   rL   r   )r!   s    r,   r   r   q   s8    E""">((%(((r.   )r   c                       e Zd ZU dZdZded<   d fdZdd
Zd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   distributionrO   r#   r$   c                    t                                          |           t          |                               |           dS )zj
        Construct the command for dist, updating
        vars(self) with any keyword parameters.
        N)r0   r1   varsupdate)r4   rO   kwr7   s      r,   r1   zCommand.__init__   s=    
 	T

"r.   Nc           	         t          | |          }|t          | ||           |S t          |t                    st	          d|d|d|d          |S )N'z' must be a z (got `z`))getattrsetattr
isinstancestrr   )r4   optionwhatdefaultvals        r,   _ensure_stringlikezCommand._ensure_stringlike   sq    dF##;D&'***NC%% 	&&28&&$$$D   
r.   rh   rg   c                6   t          | |          }|dS t          |t                    r&t          | |t	          j        d|                     dS t          |t                    rt          d |D                       }nd}|st          d|d|d          dS )a  Ensure that 'option' is a list of strings.  If 'option' is
        currently a string, we split it either on /,\s*/ or /\s+/, so
        "foo bar baz", "foo,bar,baz", and "foo,   bar baz" all become
        ["foo", "bar", "baz"].

        ..
           TODO: This method seems to be similar to the one in ``distutils.cmd``
           Probably it is just here for backward compatibility with old Python versions?

        :meta private:
        Nz,\s*|\s+c              3  @   K   | ]}t          |t                    V  d S rB   )rf   rg   )r*   vs     r,   	<genexpr>z-Command.ensure_string_list.<locals>.<genexpr>   s,      99As++999999r.   Frc   z!' must be a list of strings (got ))	rd   rf   rg   re   resplitlistallr   )r4   rh   rk   oks       r,   ensure_string_listzCommand.ensure_string_list   s     dF##;FS!! 
	D&"(;"<"<=====#t$$ 99S99999 **AGM   r.   commandreinit_subcommandsboolr   c                    d S rB   r)   r4   rx   ry   ra   s       r,   reinitialize_commandzCommand.reinitialize_command   s	     3r.   r   c                    d S rB   r)   r|   s       r,   r}   zCommand.reinitialize_command   s	     Cr.   str | _Commandc                v    t          j        | ||          }t          |                              |           |S rB   )r   r}   r_   r`   )r4   rx   ry   ra   cmds        r,   r}   zCommand.reinitialize_command   s8     +D';MN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.
        NotImplementedErrorr@   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``).
        r   r@   s    r,   rA   zCommand.finalize_options   r   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).
        r   r@   s    r,   runzCommand.run   r   r.   )rO   r   r#   r$   rB   )rh   rg   r#   r$   )F)rx   rg   ry   rz   r#   r   )rx   r   ry   rz   r#   r   )rx   r   ry   rz   r#   r   )r#   r$   )rC   rD   rE   rF   command_consumes_arguments__annotations__r1   rl   rw   r   r}   r   r   rA   r   rG   rH   s   @r,   r   r      sV        # #J "'     	 	 	 	   6 7<    X =B    X CH     " " " ^" " " " ^" " " " ^" " " " "r.   r   c                    d t          j        | d          D             }t          t           j        j        |          S )z%
    Find all files under 'path'
    c              3  h   K   | ]-\  }}}|D ]$}t           j                            ||          V  %.d S rB   )ospathjoin)r*   basedirsfilesfiles        r,   rp   z#_find_all_simple.<locals>.<genexpr>  sc        D$   	T4        r.   T)followlinks)r   walkfilterr   isfile)r   resultss     r,   _find_all_simpler     sE     !#4!@!@!@  G
 "'.'***r.   c                    t          |           }| t          j        k    r5t          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   r   curdir	functoolspartialr   relpathmaprt   )dirr   make_rels      r,   findallr     sR    
 S!!E
bi$RW_C@@@He$$;;r.   c                      e Zd ZdZdS )sicz;Treat this string as-is (https://en.wikipedia.org/wiki/Sic)N)rC   rD   rE   rF   r)   r.   r,   r   r     s        EEEEr.   r   )rO   r   )@rF   
__future__r   r   r   rr   sysabcr   collections.abcr   typingr   r   r   r   extendr   dirname__file__vendor_pathmodulespop_distutils_hack.override_distutils_hack r   r   dependsr   	discoveryr   r   rO   r   	extensionr   versionr   warningsr   distutils.corerK   distutils.errorsr   __all__r   bootstrap_install_fromfindr   r   rP   rN   r   rL   r   r   get_unpatchedr   r   r   rg   r   	patch_allr)   r.   r,   <module>r      s&   F F # " " " " "     				 				 



       # # # # # # 3 3 3 3 3 3 3 3 3 3 bgoobgooh>W>W.X.XZfhq!r!rr+{~  |D  D  IT  HU  U  V  V  V T " " "                   9 9 9 9 9 9 9 9                   / / / / / / 2 2 2 2 2 2     1 1 1 1 1 1	 	 	 GKz222	 "-2 #  #  # L   *) ) ) $, <2222222#v#IN$:;;H" " " " "h " " "D	+ 	+ 	+ 	 	 	 	 	F F F F F# F F F
       r.   