403Webshell
Server IP : 46.62.235.243  /  Your IP : 216.73.216.163
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux Linkabili3Dicembre 6.8.0-100-generic #100-Ubuntu SMP PREEMPT_DYNAMIC Tue Jan 13 16:40:06 UTC 2026 x86_64
User : www-data ( 33)
PHP Version : 8.1.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /proc/thread-self/root/lib/python3/dist-packages/gyp/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/thread-self/root/lib/python3/dist-packages/gyp/__pycache__/common.cpython-312.pyc
�

�"Kb�O���ddlmZddlZddlZddlZddlZddlZddlZddl	m
Z
Gd�de�ZGd�de
�Zd�Zd	�Zd
�Zd�Zd�Zd
�Zd�Zed%d��Zed&d��Zd�Zd�Zej4d�Zej4d�Zd�Zd�Zd�Zd�Z d�Z!d�Z"d�Z#d�Z$ifd�Z%d&d�Z&Gd�d e
jN�Z(Gd!�d"e
�Z)d#�Z*d$�Z+y)'�)�with_statementN)�collections_abcc��eZdZd�Zd�Zy)�memoizec� �||_i|_y�N)�func�cache)�selfr	s  �,/usr/lib/python3/dist-packages/gyp/common.py�__init__zmemoize.__init__s���D�I��D�J�c��	|j|S#t$r#|j|�}||j|<|cYSwxYwr)r
�KeyErrorr	)r�args�results   r�__call__zmemoize.__call__sH���
�Z�Z��
������t�y�y�$��f��d�j�j���
�m��s��)=�=N)�__name__�
__module__�__qualname__r
r�rrrrs���rrc��eZdZdZy)�GypErrorz�Error class representing an error, which is to be presented
  to the user.  The main entry point will catch and display this.
  N)rrr�__doc__rrrrr s���rrc��|js	|f|_yt|j�dk(r%t|jd�dz|zf|_yt|jd�dz|zf|jddz|_y)z2Append a message to the given exception's message.�r� N)r�len�str)�e�msgs  r�ExceptionAppendr"'sq��	
����V�A�F�
�1�6�6�{�a���!�&�&��)�n�s�"�S�(�
*�A�F��!�&�&��)�n�s�"�S�(�
*�Q�V�V�A�B�Z�
7�A�Frc�P�|D�cgc]}t|�d|k(s�|��c}Scc}w)zc
  Given a list of qualified targets, return the qualified targets for the
  specified |target|.
  r��ParseQualifiedTarget)�target�qualified_list�ts   r�FindQualifiedTargetsr)1s*��
$�	L��';�A�'>�q�'A�V�'K�!�	L�L��	Ls�#�#c��|jdd�}t|�dk(r|\}}nd}|jdd�}t|�dk(r|\}}nd}|||gS)N�:r��#)�rsplitr)r&�target_split�
build_file�toolsets    rr%r%9si�����s�A�&�,����!��'��Z���J����s�A�&�,����!��$��V�W��G�
�f�g�	&�&rc�J�t|�\}}}|r�|r�tjjtjj	tjj|�|��}tjj
|�st|d�}n|}|r|}|||gS)N�.)r%�os�path�normpath�join�dirname�isabs�RelativePath)r0r&r1�parsed_build_file�parsed_toolsets     r�
ResolveTargetr=Ls���1E�V�0L�-��f�n����7�7�#�#�B�G�G�L�L�������1L�1B�%D�E�j��W�W�]�]�:�
&�!�*�c�2�
�$�j���G�
�f�g�	&�&rc��t|�dS�Nrr$)�fully_qualified_targets r�	BuildFilerAns��	�4�	5�a�	8�8rc�b�|D])}|tjvs�tj|cS|S)zpLook up a key in the environment, with fallback to secondary keys
  and finally falling back to a default value.)r4�environ)�var_list�default�vars   r�GetEnvironFallbackrGss4����c�
�b�j�j��
�Z�Z��_���
�.rc�*�|dz|z}|r|dz|z}|S)Nr+r-r)r0r&r1�fully_qualifieds    r�QualifiedTargetrJ|s+����$�v�-�/��%��+�g�5�O�	�rc�\�|r tjj|�}ntjj|�}tjj|�}tj
dk(rctjj
|�dj�tjj
|�dj�k7r|S|jtjj�}|jtjj�}ttjj||g��}tjjgt|�|z
z||dz}t|�dk(rytjj|�S)N�win32r�)r4r5�realpath�abspath�sys�platform�
splitdrive�lower�split�sepr�commonprefix�pardirr7)r5�relative_to�follow_path_symlink�
path_split�relative_to_split�
prefix_len�relative_splits       rr:r:�sC���
�7�7���D�!�D�
�7�7�?�?�4� �D���� � ��-�+�	�\�\�W��
�����4� ��#�)�)�+�
�����;�'��*�0�0�2�	3�
�k��z�z�"�'�'�+�+�&�*�!�'�'������4���2�7�7�'�'��5F�(G�H�I�*��G�G�N�N�#�s�+<�'=�
�'J�K��j�k�*�+�.�	���A��
�
�����~�	&�&rc�j�|s|S|�dn|}t|tjj||��S)aGiven a path like foo/bar that is relative to toplevel_dir, return
  the inverse relative path back to the toplevel_dir.

  E.g. os.path.normpath(os.path.join(path, InvertRelativePath(path)))
  should always produce the empty string, unless the path contains symlinks.
  r3)r:r4r5r7)r5�toplevel_dirs  r�InvertRelativePathr`�s4��
��K�$�,��,�,�	�l�B�G�G�L�L��t�$D�	E�Erc�\�tjj|�r|St||�Sr)r4r5r9r:)r5rXs  r�FixIfRelativePathrb�s$���W�W�]�]�4���K�	�d�K�	(�(rc��tjj|�}tjjtjj	||��Sr)r4r5r8r6r7)r5rX�rel_dirs   r�UnrelativePathre�s:��
�G�G�O�O�K�(�'�	���	�	�"�'�'�,�,�w��5�	6�6rz[	
 #$%&'()*;<=>?[{|}~]|^$z(["\\`])c��t|t�st|�}tj|�rd}nd}|t	j
td|�z|z}|S)a�Encodes |argument| suitably for consumption by POSIX shells.

  argument may be quoted and escaped as necessary to ensure that POSIX shells
  treat the returned value as a literal representing the argument passed to
  this function.  Parameter (variable) expansions beginning with $ are allowed
  to remain intact without escaping the $, to allow the argument to contain
  references to variables to be expanded by the shell.
  �"rMz\\\1)�
isinstancer�_quote�search�re�sub�_escape)�argument�quote�encodeds   r�EncodePOSIXShellArgumentrqsN��
�H�c�	"��8�}�H��]�]�8���E��E��B�F�F�7�G�X�6�6��>�'�	�.rc�j�g}|D]}|jt|���dj|�S)z�Encodes |list| suitably for consumption by POSIX shells.

  Returns EncodePOSIXShellArgument for each item in list, and joins them
  together using the space character as an argument separator.
  r)�appendrqr7)�list�encoded_argumentsrns   r�EncodePOSIXShellListrvs?�����A�h����5�h�?�@�A�	���#�	$�$rc�b�t�}t|�}|r�|j�}||vr�|j|�||}|jt|j	dg���|jt|j	dg���|r��t|t|�z
�S)z2Returns the recursive list of target dependencies.�dependencies�dependencies_original)�set�pop�add�update�getrt)�target_dicts�rootsrx�pending�r�specs      r�DeepDependencyTargetsr�)s�����,���J�'�����
�A��L������Q����?�D��N�N�3�t�x�x���3�4�5��N�N�3�t�x�x� 7��<�=�>�	�
�l�S��Z�'�	(�(rc�J�|D�cgc]}t|�|k(s�|��c}Scc}w)zHFrom a target_list, returns the subset from the specified build_file.
  )rA)�target_listr0�ps   r�BuildFileTargetsr�<s#��!�	?��I�a�L�J�$>�!�	?�?��	?s� � c�<�t||�}t||�}||zS)zNReturns all targets (direct and dependencies) for the specified build_file.
  )r�r�)r�rr0�	bftargets�
deptargetss     r�
AllTargetsr�Bs'���{�J�7�)�$�\�9�=�*�	�Z�	�rc�4��G�fd�dt�}|�S)z�Write to a file only if the new contents differ.

  Arguments:
    filename: name of the file to potentially write to.
  Returns:
    A file like object which will write to temporary file and only overwrite
    the target if it differs (on close).
  c�,��eZdZdZ�fd�Zd�Z�fd�Zy)�WriteOnDiff.<locals>.Writerz?Wrapper around file which only covers the target if it differs.c�^��tjdtjj	��ddztjj	��d��\}|_	tj|d�|_y#t$r!tj|j
��wxYw)Nz.tmprz.gyp.r)�suffix�prefix�dir�w)
�tempfile�mkstempr4r5rT�tmp_path�fdopen�tmp_file�	Exception�unlink)r�tmp_fd�filenames  �rr
z$WriteOnDiff.<locals>.Writer.__init__Vs����&�.�.�������x�(��+�g�5��g�g�m�m�H�%�a�(�*��f�d�m���	�	�&�#�.��
��
��
�	�	�$�-�-� �
��s�&B�*B,c�.�t|j|�Sr)�getattrr�)r�attrnames  r�__getattr__z'WriteOnDiff.<locals>.Writer.__getattr__cs��
�T�]�]�H�
-�-rc���	|jj�d}	tj|j�d�}|r tj|j�ytjd�}tj|�tj|jd|z�tjdk(r4tjj��rtj ��tj"|j��y#t
$r)}|jtjk7r�Yd}~��d}~wwxYw#t$$r!tj|j��wxYw)NF�?i�rL)r��close�filecmp�cmpr��OSError�errno�ENOENTr4r��umask�chmodrPrQr5�exists�remove�renamer�)r�samer r�r�s    �rr�z!WriteOnDiff.<locals>.Writer.closegs	���&��
�
������	����T�]�]�H�e�<�$�
�
�)�)�D�M�M�
"��(�(�4�.�%�
�(�(�5�/�
�(�(�4�=�=�%�5�&�.�
1�
�\�\�W�
$�������)A�
�I�I�h��
�)�)�D�M�M�8�
,��7�	�
�W�W����
$��%��	��8��
�	�	�$�-�-� �
��s;�E�!D�!E�#B5E�	E�"E�E�E�E�*E8N)rrrrr
r�r�)r�s�r�Writerr�Ts���I��.�'rr�)�object)r�r�s` r�WriteOnDiffr�Js���:�v�:�x
��/rc��	tjtjj|��y#t$rYywxYw)z*Make sure the directory for |path| exists.N)r4�makedirsr5r8r�)r5s r�EnsureDirExistsr��s2��	��K�K�������%�&��	�	��	�s�25�	A�Ac�,�dddd�}d|vr|dStj|vr|tjStjjd�rytjjd�rytjjd�rytjjd	�ry	tjjd
�ry
tjjd�rytjjd�ryy
)zFReturns |params.flavor| if it's set, the system's default flavor else.�win�mac)�cygwinrL�darwin�flavor�sunos�solaris�freebsd�openbsd�netbsd�aix�zos�os390�linux)rPrQ�
startswith)�params�flavorss  r�	GetFlavorr��s����
��
�'�����(����\�\�W���3�<�<� � ��\�\���W�%���\�\���Y�'���\�\���Y�'���\�\���X�&���\�\���U�#���\�\���U�#���\�\���W�%��	rc	��ddddd�j|d�}|sytjjtjj	tjjt��d|z�}t|�5}|j�}ddd�d}|jdd�}|dk(r
|r|d	|zz
}tjj|d
|z�}	t|	d�5}
|
jdjd
|g|ddz��ddd�tj|	d�y#1swY��xYw#1swY�,xYw)zRFinds (flock|mac|win)_tool.gyp in the gyp directory and copies it
  to |out_path|.�flockr�r�)r�r�r�r�Nz
%s_tool.pyz!# Generated by gyp. Do not edit.
�mac_toolchain_dirz,import os;
os.environ['DEVELOPER_DIR']='%s'
zgyp-%s-toolr�rMrri�)r~r4r5r7r8rO�__file__�open�	readlines�writer�)r��out_path�generator_flagsr��source_path�source_file�source�headerr��	tool_path�	tool_files           r�CopyToolr��sH����
�
�	�
	��F�D��	�
�
�������g�g�o�o�b�g�g�o�o�h�/�0�,��2G�I�+��K��%�K�
�
"�
"�
$�F�%�0�&�&�*�*�+>��E���u�_�*�
�>�
���F��g�g�l�l�8�]�V�%;�<�)��I�s��3�y�
�O�O�
������F�#�f�Q�R�j�0�1�3�3�
�(�(�9�e��#%�%��3�3�s�D=�2,E	�=E�	Ec�l�|�d�}i}g}|D]%}||�}||vr�d||<|j|��'|S)Nc��|Srr)�xs r�<lambda>zuniquer.<locals>.<lambda>�s��!�rr)rs)�seq�idfun�seenr�item�markers      r�uniquerr��sS���}���
�D�
�F�����t����T�>�8���V���
�
�d��	�
�Mrc�R�eZdZd
d�Zd�Zd�Zd�Zd�Zd�Zd�Z	dd	�Z
d
�Zd�Zd�Z
y)�
OrderedSetNc�D�gx|_}|d||gz
}i|_|�||z}yyr)�end�map)r�iterabler�s   rr
zOrderedSet.__init__�s;����D�H�s��D�#�s���C��D�H���
�h��d�rc�,�t|j�Sr)rr��rs r�__len__zOrderedSet.__len__�s���t�x�x�=�rc��||jvSr)r�)r�keys  r�__contains__zOrderedSet.__contains__�s���$�(�(�?�rc�|�||jvr.|j}|d}|||gx|d<x|d<|j|<yy)Nrr,)r�r�)rr�r��currs    rr|zOrderedSet.addsK��
�$�(�(���H�H�c�
��V�d�*-�t�S�)9�9�d�1�g�9��A�����#��rc�t�||jvr*|jj|�\}}}||d<||d<yy)Nr,r)r�r{)rr��	prev_item�	next_items    r�discardzOrderedSet.discards=��
�d�h�h��"&�(�(�,�,�s�"3��c�9�i��i��l��i��l�rc#�ZK�|j}|d}||ur|d��|d}||ur�yy�w)Nr,r�r��rr�r�s   r�__iter__zOrderedSet.__iter__�:����
�(�(�C��q�6�D�
�c�/���G�m�
�!�W�d��c�/���&+�+c#�ZK�|j}|d}||ur|d��|d}||ur�yy�w)Nrrr�r�s   r�__reversed__zOrderedSet.__reversed__r�r�c��|std��|r|jddn|jdd}|j|�|S)Nzset is emptyrrr,)rr�r�)r�lastr�s   rr{zOrderedSet.popsB����^�$�$� �$�(�(�1�+�a�.�d�h�h�q�k�!�n�C��L�L����Jrc��|s|jj�d�S|jj�dt|��d�S)Nz()�(�))�	__class__rrtr�s r�__repr__zOrderedSet.__repr__"s1����~�~�.�.�
0�0��~�~�.�.��T�
�;�;rc��t|t�r0t|�t|�k(xrt|�t|�k(St	|�t	|�k(Sr)rhr�rrtrz)r�others  r�__eq__zOrderedSet.__eq__'sD���%��$�
��Y�#�e�*�
$�
B��d��t�E�{�)B�B��t�9��E�
�"�"rc�>�|D]}||vs�|j|��yr)r|)rr��is   rr}zOrderedSet.update-s#��
���	
�$�������rr�T)rrrr
r�r�r|r�r�r�r{rrr}rrrr�r��s9�����:�����<�
#�rr�c��eZdZdZd�Zd�Zy)�
CycleErrorz9An exception raised when an unexpected cycle is detected.c��||_yr)�nodes)rr
s  rr
zCycleError.__init__5s	���D�Jrc�2�dt|j�zS)NzCycleError: cycle involving: )rr
r�s r�__str__zCycleError.__str__7s��*�S����_�<�<rN)rrrrr
rrrrrr3s��A��=rrc�������t���t��t��g������fd��t|�D]
}�|���S)a�Topologically sort based on a user provided edge definition.

  Args:
    graph: A list of node names.
    get_edges: A function mapping from node name to a hashable collection
               of node names which this node has outgoing edges to.
  Returns:
    A list containing all of the node in graph in topological order.
    It is assumed that calling get_edges once for each node and caching is
    cheaper than repeatedly calling get_edges.
  Raises:
    CycleError in the event of a cycle.
  Example:
    graph = {'a': '$(b) $(c)', 'b': 'hi', 'c': '$(b)'}
    def GetEdges(node):
      return re.findall(r'\$\(([^))]\)', graph[node])
    print(TopologicallySorted(graph.keys(), GetEdges))
    ==>
    ['a', 'c', b']
  c����|�vrt���|�vry�j|��j|��|�D]
}�|���j|��jd|�yr?)rr|r��insert)�node�neighbor�Visit�	get_edges�
ordered_nodes�visited�visitings  �����rrz"TopologicallySorted.<locals>.VisitTsn����x���x� � ��w����K�K����L�L����d�O����H�o���O�O�D������D�!r)rrz�sorted)�graphrrrrrrs ` @@@@r�TopologicallySortedr;sN���*�i� �)��E�'�
�U�(��-�
"�
"��U�m��d�	�$�K��	�rc���tjjd�xs�tjjd�xs�tjjd�xs�tjjd�xsatjjd�xs@tjjd�xstjjd�S)N�GYP_CROSSCOMPILE�AR_host�CC_host�CXX_host�	AR_target�	CC_target�
CXX_target)r4rCr~rrr�CrossCompileRequestedr%cs���
�*�*�.�.�+�
,�'�
�*�*�.�.��
#�'�
�*�*�.�.��
#�'�
�*�*�.�.��
$�'�
�*�*�.�.��
%�	'�

�*�*�.�.��
%�'�
�*�*�.�.��
&�
(rr	r),�
__future__rr�r��os.pathr4rkr�rP�	six.movesrr�rr�rr"r)r%r=rArGrJr:r`rbre�compilerirmrqrvr�r�r�r�r�r�r�r��
MutableSetr�rrr%rrr�<module>r+s��
&����	��
�%�

�f�
��y��8�M�'�&'�D9�
��	�('�	�('�V	�
F�	�
F�)�7�D
����3�	4��4�"�*�*�[�
!���.
%�)�&@� �F�R	��<02�"�V
�>��+�+�>�B=��=�&�P	(r

Youez - 2016 - github.com/yon3zu
LinuXploit