%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/setuptools/_distutils/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/setuptools/_distutils/__pycache__/util.cpython-312.pyc

�


_�d�F��V�dZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
mZmZddl
mZddlmZddlmZd�Zd	�Zej(d
k(rdadZd�Zd
�Zd�Zd�Zd�Zd�Ze	j:�d��Zd�Zd�Z dd�Z!dxa"xa#a$d�Z%d�Z&dd�Z'd�Z(							dd�Z)d�Z*y)zudistutils.util

Miscellaneous utility functions -- anything that doesn't fit into
one of the other *util.py modules.
�N�)�DistutilsPlatformError�DistutilsByteCompileError)�newer)�spawn)�logc���tjdkrUtjdk(rBdtjj�vrydtjj�vrytjdkrUtjdk(rBt
td	�r2tj�\}}}}}|d
ddk(rd
dlm	}||||�Stj�S)z�
    Return a string that identifies the current platform. Use this
    function to distinguish platform-specific build directories and
    platform-specific built distributions.
    )���ntz(arm)�	win-arm32z(arm64)�	win-arm64)r
�	�posix�unameNr
�aixr)�aix_platform)�sys�version_info�os�name�version�lower�hasattrr�
py38compatr�	sysconfig�get_platform)�osname�host�releaser�machiners      �</usr/lib/python3/dist-packages/setuptools/_distutils/util.py�get_host_platformr#s������&� �
�7�7�d�?��#�+�+�+�+�-�-�"��C�K�K�-�-�/�/�"�
���&� �
�7�7�g��'�"�g�"6�68�h�h�j�3�F�D�'�7�G��b�q�z�U�"�4�#�F�G�W�=�=��!�!�#�#�c���tjdk(rCddddd�}tjjd�}|j|�xs
t	�St	�S)Nr�win32z	win-amd64r
r)�x86�x64�arm�arm64�VSCMD_ARG_TGT_ARCH)rr�environ�getr#)�TARGET_TO_PLAT�targets  r"rr3sX��	�w�w�$����� �	
������� 4�5���!�!�&�)�@�->�-@�@���r$�darwin�MACOSX_DEPLOYMENT_TARGETc��day)zFor testing only. Do not call.N)�_syscfg_macosx_ver�r$r"�_clear_cached_macosx_verr5Es
���r$c�b�t�$ddlm}|jt�xsd}|r|atS)z�Get the version of macOS latched in the Python interpreter configuration.
    Returns the version as a string or None if can't obtain one. Cached.r)r�)r3�	distutilsr�get_config_var�MACOSX_VERSION_VAR)r�vers  r"�!get_macosx_target_ver_from_syscfgr<Ks4���!�'�&�i�&�&�'9�:�@�b���!$���r$c���t�}tjjt�}|rB|r>t|�ddgk\r.t|�ddgkrdtzd|�d|�d�z}t
|��|S|S)aReturn the version of macOS for which we are building.

    The target version defaults to the version in sysconfig latched at time
    the Python interpreter was built, unless overridden by an environment
    variable. If neither source has a value, then None is returned�
r
�$z mismatch: now "z" but "z*" during configure; must use 10.3 or later)r<rr,r-r:�
split_versionr)�
syscfg_ver�env_ver�my_msgs   r"�get_macosx_target_verrDXs���3�4�J��j�j�n�n�/�0�G��
��j�)�b�!�W�4��g�&�"�a��0��(�(�,3�Z�,A�A�
�
)��0�0����r$c�\�|jd�D�cgc]
}t|���c}Scc}w)zEConvert a dot-separated string into a list of numbers for comparisons�.)�split�int)�s�ns  r"r@r@xs"���G�G�C�L�)�q�C��F�)�)��)s�)c�>�tjdk(r|S|s|S|ddk(rtd|z��|ddk(rtd|z��|jd�}d|vr|j	d�d|vr�|stj
Stjj|�S)a�Return 'pathname' as a name that will work on the native filesystem,
    i.e. split it on '/' and put it back together again using the current
    directory separator.  Needed because filenames in the setup script are
    always supplied in Unix style, and have to be converted to the local
    convention before we can actually use them in the filesystem.  Raises
    ValueError on non-Unix-ish systems if 'pathname' either starts or
    ends with a slash.
    �/rzpath '%s' cannot be absolute���zpath '%s' cannot end with '/'rF)r�sep�
ValueErrorrG�remove�curdir�path�join)�pathname�pathss  r"�convert_pathrV}s���
�v�v��}��������{�c���7�(�B�C�C���|�s���8�8�C�D�D��N�N�3��E�

��,�
���S����,���y�y��
�7�7�<�<���r$c���tjdk(rbtjj|�s tjj	||�Stjj	||dd�Stjdk(rOtjj|�\}}|ddk(r|dd}tjj	||�St
dtj�d���)	a	Return 'pathname' with 'new_root' prepended.  If 'pathname' is
    relative, this is equivalent to "os.path.join(new_root,pathname)".
    Otherwise, it requires making 'pathname' relative and then joining the
    two, which is tricky on DOS/Windows and Mac OS.
    rrNrr�\znothing known about platform '�')rrrR�isabsrS�
splitdriver)�new_rootrT�driverRs    r"�change_rootr^�s���
�w�w�'���w�w�}�}�X�&��7�7�<�<��(�3�3��7�7�<�<��(�1�2�,�7�7�	���D�����*�*�8�4�
�����7�d�?����8�D��w�w�|�|�H�d�+�+�
 �#A�"�'�'��!�!L�
M�Mr$c�L�tjdk(rNdtjvr<	ddl}|j	tj
��dtjd<dtjvrt�tjd<yy#ttf$rY�@wxYw)aLEnsure that 'os.environ' has all the environment variables we
    guarantee that users can use in config files, command-line options,
    etc.  Currently this includes:
      HOME - user's home directory (Unix only)
      PLAT - description of the current platform, including hardware
             and OS (see 'get_platform()')
    r�HOMErN��PLAT)	rrr,�pwd�getpwuid�getuid�ImportError�KeyErrorr)rcs r"�
check_environrh�s���
�w�w�'��f�B�J�J�6�	��!$���b�i�i�k�!:�1�!=�B�J�J�v���R�Z�Z��)�^��
�
�6�� ���X�&�	�
�	�s�;B�B#�"B#c��t�ttj�}|j	d�|j�D��	t
|�j|�S#t$r}td|����d}~wwxYw)a�
    Perform variable substitution on 'string'.
    Variables are indicated by format-style braces ("{var}").
    Variable is substituted by the value found in the 'local_vars'
    dictionary or in 'os.environ' if it's not in 'local_vars'.
    'os.environ' is first checked/augmented to guarantee that it contains
    certain values: see 'check_environ()'.  Raise ValueError for any
    variables not found in either 'local_vars' or 'os.environ'.
    c3�<K�|]\}}|t|�f���y�w�N��str)�.0r�values   r"�	<genexpr>zsubst_vars.<locals>.<genexpr>�s����K���u�4��U��$�K�s�zinvalid variable N)
rh�dictrr,�update�items�
_subst_compat�
format_maprgrO)rI�
local_vars�lookup�vars    r"�
subst_varsry�sp���O�
�"�*�*�
�F�
�M�M�K�
�8H�8H�8J�K�K�4��Q��*�*�6�2�2���4��,�S�E�2�3�3��4�s�A%�%	B�.A<�<Bc�x�d�}tjd||�}||k7rddl}|jdt�|S)zb
    Replace shell/Perl-style variable substitution with
    format-style. For compatibility.
    c�,�d|jd��d�S)N�{r�})�group)�matchs r"�_substz_subst_compat.<locals>._subst�s���E�K�K��N�#�2�&�&r$z\$([a-zA-Z_][a-zA-Z_0-9]*)rNz-shell/Perl-style substitutions are deprecated)�re�sub�warnings�warn�DeprecationWarning)rIr��replr�s    r"rtrt�s?��'��6�6�/���;�D��q�y���
�
�;��	
��Kr$c��|t|�zSrkrl)�exc�prefixs  r"�grok_environment_errorr��s���C��H��r$c��tjdtjz�atjd�atjd�ay)Nz
[^\\\'\"%s ]*z'(?:[^'\\]|\\.)*'z"(?:[^"\\]|\\.)*")r��compile�string�
whitespace�
_wordchars_re�
_squote_re�
_dquote_rer4r$r"�_init_regexr��s:���J�J�/�&�2C�2C�C�D�M����0�1�J����0�1�Jr$c�*�t�
t�|j�}g}d}|�rktj||�}|j	�}|t|�k(r|j
|d|�	|S||tjvr*|j
|d|�||dj�}d}n�||dk(r|d|||dzdz}|dz}n�||dk(rtj||�}n0||dk(rtj||�}ntd||z��|�td||z��|j�\}}|d|||dz|dz
z||dz}|j	�d	z
}|t|�k\r|j
|�	|S|r��k|S)
aSplit a string up according to Unix shell-like rules for quotes and
    backslashes.  In short: words are delimited by spaces, as long as those
    spaces are not escaped by a backslash, or inside a quoted string.
    Single and double quotes are equivalent, and the quote characters can
    be backslash-escaped.  The backslash is stripped from any two-character
    escape sequence, leaving only the escaped character.  The quote
    characters are stripped from any quoted string.  Returns a list of
    words.
    NrrXrrY�"z!this can't happen (bad char '%c')z"bad string (mismatched %s quotes?)�)r�r��stripr�end�len�appendr�r��lstripr�r��RuntimeErrorrO�span)rI�words�pos�mr��begs      r"�split_quotedr��s������
�	���	�A��E�
�C�
�����3�'���e�e�g���#�a�&�=��L�L��4�C��!��D�L�A
�S�6�V�&�&�&�
�L�L��4�C��!��#�$���� �A��C�
�s�V�t�^��$�3��!�C�!�G�I�,�&�A���'�C���v��}��$�$�Q��,���3��3���$�$�Q��,��"�#F��3��#O�P�P��y� �!E��#��!N�O�O�����J�S�#��$�3��!�C�!�G�c�A�g�.�.��3�4��8�A��%�%�'�A�+�C��#�a�&�=��L�L��O���L�O�N�Lr$c��|�,dj|j|�}|dddk(r|dddz}tj|�|s||�yy)a�Perform some action that affects the outside world (eg.  by
    writing to the filesystem).  Such actions are special because they
    are disabled by the 'dry_run' flag.  This method takes care of all
    that bureaucracy for you; all you have to do is supply the
    function to call and an argument tuple for it (to embody the
    "external action" being performed), and an optional message to
    print.
    Nz{}{!r}���z,)r�))�format�__name__r�info)�func�args�msg�verbose�dry_runs     r"�executer�AsT���{��o�o�d�m�m�T�2���r�s�8�t���a��)�c�/�C��H�H�S�M���d��r$c�j�|j�}|dvry|dvrytdj|���)z�Convert a string representation of truth to true (1) or false (0).

    True values are 'y', 'yes', 't', 'true', 'on', and '1'; false values
    are 'n', 'no', 'f', 'false', 'off', and '0'.  Raises ValueError if
    'val' is anything else.
    )�y�yes�t�true�on�1r)rJ�no�f�false�off�0rzinvalid truth value {!r})rrOr�)�vals r"�	strtoboolr�Ts>���)�)�+�C�
�2�2��	�5�	5���3�:�:�3�?�@�@r$c�^�tjrtd��|�|dk(}|�s1	ddlm}|d�\}	}
tjd|
�|s�|	�tj|	d�}nt|
d�}|5|jd	�|jd
jtt|��dz�|jd|�d
|�d|�d|�d|�d��ddd�tj g}
|
j#t%j&��|
j)|
�t+|
|��t-tj.|
fd|
z|��yddlm}|D�]}|dddk7r�
|dk\r+|dk(rdn|}t4j6j9||��}nt4j6j9|�}|}|r0|dt;|�|k7rt=d|�d|����|t;|�d}|r tj>j||�}tj>jA|�}|s��|stC||�r&tjd||�|r��||||���tjDd||���!y#t
$rddlm}d|d�}
}	Y��fwxYw#1swY���xYw)a~Byte-compile a collection of Python source files to .pyc
    files in a __pycache__ subdirectory.  'py_files' is a list
    of files to compile; any files that don't end in ".py" are silently
    skipped.  'optimize' must be one of the following:
      0 - don't optimize
      1 - normal optimization (like "python -O")
      2 - extra optimization (like "python -OO")
    If 'force' is true, all files are recompiled regardless of
    timestamps.

    The source filename encoded in each bytecode file defaults to the
    filenames listed in 'py_files'; you can modify these with 'prefix' and
    'basedir'.  'prefix' is a string that will be stripped off of each
    source filename, and 'base_dir' is a directory name that will be
    prepended (after 'prefix' is stripped).  You can supply either or both
    (or neither) of 'prefix' and 'base_dir', as you wish.

    If 'dry_run' is true, doesn't actually do anything that would
    affect the filesystem.

    Byte-compilation is either done directly in this interpreter process
    with the standard py_compile module, or indirectly by writing a
    temporary script and executing it.  Normally, you should let
    'byte_compile()' figure out to use direct compilation or not (see
    the source for details).  The 'direct' flag is used by the script
    generated in indirect mode; unless you know what you're doing, leave
    it set to None.
    zbyte-compiling is disabled.Nr)�mkstempz.py)�mktempz$writing byte-compilation script '%s'�wz2from distutils.util import byte_compile
files = [
z,
z]
z
byte_compile(files, optimize=z, force=z,
             prefix=z, base_dir=z,
             verbose=z$, dry_run=0,
             direct=1)
)r�zremoving %s)r����r7)�optimizationzinvalid prefix: filename z doesn't start with zbyte-compiling %s to %sz%skipping byte-compilation of %s to %s)#r�dont_write_bytecoder�tempfiler�rfr�rr�r�fdopen�open�writerS�map�repr�
executable�extend�
subprocess�"_optim_args_from_interpreter_flagsr�rr�rP�
py_compiler��	importlib�util�cache_from_sourcer�rOrR�basenamer�debug)�py_files�optimize�forcer��base_dirr�r��directr��	script_fd�script_namer��script�cmdr��file�opt�cfile�dfile�
cfile_bases                    r"�byte_compiler�dsw��P���'�(E�F�F��~�'�1�}���	;�(�'.�u�~�$�Y��
	���7��E���$����9�c�2���k�3�/���
������"���U�Z�Z��D�(�(;�<�u�D�E���� ����'�
C��'
�:�~�~����
�
�:�@�@�B�C��
�
�;��
�c�7�#���	�	�K�>�=�;�+F�PW�X�	'�� 	Y�D��B�C�y�E�!��
�1�}�$��M�b�x��!���8�8��C�8�P��!���8�8��>���E���
�#�f�+�&�&�0�$���)����c�&�k�m�,��������X�u�5�����)�)�%�0�J���E�$��.��H�H�6��j�I�"���e�U�3��I�I�E�t�Z�X�A 	Y��k�	;�'�'+�V�E�]��Y�	;��
�
�s�J�7A$J"�J�J�"J,c�J�|jd�}d}|j|�S)z�Return a version of the string escaped for inclusion in an
    RFC-822 header, by ensuring there are 8 spaces space after each newline.
    �
z	
        )rGrS)�header�linesrNs   r"�
rfc822_escaper��s%��
�L�L���E�
�C��8�8�E�?�r$)zerror: )Nrr)rrNNrrN)+�__doc__�importlib.utilr�rr�r�r�rr�	functools�errorsrr�dep_utilrr�_logrr#r�platformr3r:r5r<rDr@rVr^�	lru_cacherhryrtr�r�r�r�r�r�r�r�r�r�r4r$r"�<module>r�s�����	�	�
��
���E����$�:
��<�<�8����/���
��@*�
 �:N�*�����,��,�,4�&�(�+/�.�
�.�
�Z�2�<�D�&
A�$�
��
�
�
��TY�nr$

Zerion Mini Shell 1.0