HEX
Server: Apache
System: Linux p102.lithium.hosting 4.18.0-553.141.1.el8_10.x86_64 #1 SMP Fri Jul 10 17:48:02 UTC 2026 x86_64
User: bvzmoamr (9955)
PHP: 8.1.34
Disabled: syslog
Upload Files
File: //usr/lib/python3.6/site-packages/gyp/__pycache__/__init__.cpython-36.pyc
3

��S]�V�@sddlmZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlm
Z
yeWnek
rxeZYnXiZdZdZdZdd�Zd	d
�Zigdddd
d
fdd�Zdd�Zdd�Zdd�Zdd�Zdd�ZGdd�dej�Zdd�Zdd�Z d d!�Z!e"d"k�re
j#e!��dS)#�)�print_functionN)�GypErrorZgeneral�	variables�includesc
Gs�dtjks|tjkr�d	}y$tjdd�}|r:|ddd�}WnYnX|rV||;}td|j�tjj|d�|d|d|f�dS)
N�all�unknownr�)�limit�z%s:%s:%d:%s %s�)rrr)	�gyp�debug�	traceback�
extract_stack�print�upper�os�path�basename)�mode�message�argsZctx�f�r�/usr/lib/python3.6/__init__.py�DebugOutput srcCs<d}tjtj��}g}x |D]}|j|�r|j|�qW|S)Nz.gyp)r�listdir�getcwd�endswith�append)�	extension�files�build_files�filerrr�FindBuildFiles.s

r$�.FTc	Cs�|dkri}d|kr(|jdd�\}|d<tj|�}||d<|jdd�|d<|jd�r�tjj|�d	}	tjj|	�\}
}	tjj|
�}
|
tjkr�tjj	d	|
�nd
|}	t
|	t�t�|	�}x"|j
j�D]\}}
|j||
�q�Wt|dd�r�|j||�t|dd��r|j|�t|d
g�t|dg�t|dg�t|dd�t|dd�t|dd�t|dd�d�}tjj|||dd�||||||d|d�
}|g|S)z�
  Loads one or more specified build files.
  default_variables and includes will be copied before use.
  Returns the generator for the specified format and the
  data returned by loading the specified build files.
  N�-rZflavorZ	GENERATOR�ZGENERATOR_FLAVORz.pyrzgyp.generator.�CalculateVariables�CalculateGeneratorInputInfoZ+generator_additional_non_configuration_keysZ"generator_additional_path_sectionsZ!generator_extra_sources_for_rules�$generator_supports_multiple_toolsetsF�4generator_wants_static_library_dependencies_adjustedT�#generator_wants_sorted_dependencies�generator_filelist_paths)Znon_configuration_keysZ
path_sectionsZextra_sources_for_rulesr*r+r,r-�parallel�root_targets)�split�copy�getrrr�splitext�abspath�sys�insert�
__import__�globals�localsZgenerator_default_variables�items�
setdefault�getattrr(r)r�input�Load)r"�formatZdefault_variablesr�depth�params�check�circular_check�duplicate_basename_checkZgenerator_namer�	generator�key�valZgenerator_input_info�resultrrrr>8sD	








r>c
Csvi}xl|D]d}|jdd�}t|�dkrbyt|d�}Wntk
rR|d}YnX|||d<q
d||d<q
W|S)z�
  Takes an array of strings of the form 'NAME=VALUE' and creates a dictionary
  of the pairs.  If a string is simply NAME, then the value in the dictionary
  is set to True.  If VALUE can be converted to an integer, it is.
  �=rrrT)r0�len�int�
ValueError)Zname_value_listrH�item�tokensZtoken_valuerrr�NameValueListToDict�s
rOcCs tjj|g�}|rtj|�}|S)N)r�environr2�shlexr0)�env_name�flagsrrr�ShlexEnv�s
rTcCs|jd�rd||fS||S)Nz--z%s=%s)�
startswith)�opt�valuerrr�	FormatOpt�s
rXcCstg}|jrJ|rJx:t|�D].}t|||��}||kr<|j|�|j|�qW|rpx |D]}|jt|||���qTW|S)a�Regenerate a list of command line flags, for an option of action='append'.

  The |env_name|, if given, is checked in the environment and used to generate
  an initial list of options, then the options that were specified on the
  command line (given in |values|) are appended.  This matches the handling of
  environment variables and command line flags where command line flags override
  the environment, while not requiring the environment to be set when the flags
  are used again.
  )�use_environmentrTrX�remover)�flag�valuesZ	predicaterR�optionsrS�
flag_valuerWrrr�RegenerateAppendFlag�s



r_csZ�fdd�}dd�}dg}�x8�jj�D�](\}}|d}t�|�}|ddkrT|pV|}|d	}	|d
}
|	dkr�|jt||||
���q(|	dkr�|r�|jt|||���n2�jr�|
r�tj	j
|
�r�|jt||tj	j
|
����q(|	dk�r<|	dkr�|�s|	dk�r|�r|j|�n&�j�rR|
�rRtd|	||
ftj
d�q(td|	|ftj
d�q(W|S)a}Given a parsed options object, and taking the environment variables into
  account, returns a list of flags that should regenerate an equivalent options
  object (even in the absence of the environment variables.)

  Any path options will be normalized relative to depth.

  The format flag is not included, as it is assumed the calling generator will
  set that as appropriate.
  cs tjj|�j�}|stjjS|S)N)r�commonZFixIfRelativePathr@rr�curdir)r)r]rr�FixPath�sz RegenerateFlags.<locals>.FixPathcSs|S)Nr)rWrrr�Noop�szRegenerateFlags.<locals>.Noopz--ignore-environmentrV�typer�actionrRr�storeN�
store_true�store_falsezJWarning: environment regeneration unimplemented for %s flag %r env_name %r)r#z9Warning: regeneration unimplemented for action %r flag %r)rfN)rgrh)�_regeneration_metadatar:r<�extendr_rrXrYrrPr2rr5�stderr)r]rbrcrS�nameZmetadatarVrWZvalue_predicatererRr)r]r�RegenerateFlags�s:


rmc@s$eZdZdd�Zdd�Zdd�ZdS)�RegeneratableOptionParsercCsi|_tjj|�dS)N)�1_RegeneratableOptionParser__regeneratable_options�optparse�OptionParser�__init__)�selfrrrrr�sz"RegeneratableOptionParser.__init__cOsx|jdd�}d|kr`|jdd�r`|d}|jd�}|dkrBd|d<|jd	�|||d
d�|j|<tjj|f|�|�dS)a�Add an option to the parser.

    This accepts the same arguments as OptionParser.add_option, plus the
    following:
      regenerate: can be set to False to prevent this option from being included
                  in regeneration.
      env_name: name of environment variable that additional values for this
                option come from.
      type: adds type='path', to tell the regenerator that the values of
            this option need to be made relative to options.depth
    rRN�dest�
regenerateTrdr�stringrer)rerdrRrV)�popr2rorprq�
add_option)rsr�kwrRrtrdrrrrx�s
z$RegeneratableOptionParser.add_optioncGs&tjj|f|��\}}|j|_||fS)N)rprq�
parse_argsrori)rsrr\rrrrzsz$RegeneratableOptionParser.parse_argsN)�__name__�
__module__�__qualname__rrrxrzrrrrrn�srnc"
Cs4tjjtjd�}t�}d}|j|jdd��|jddddd	�|jd
ddd
d	�|jddddddd�|jdddddgdd�|jddddddd�|jd d!d"d#d$d%�|jd&d'd(dd)d*d+d,�|jd-d.dgd/d0d1d2�|jd3d4ddd5d#d6d7d8�|jd9d:d;d<d*d=d>�|jd?d@dAddBd#dCdD�|jdEdFd;d<d*dGd>�|jdHdId;d<d*dJd>�|jdKdd*dLdM�|jdNdOdPdQdRdS�|jdTdUddd5d#dVdW�|jdXdYdZdd[d\d]�|j	|�\}}|}|j
�sXd}d}|j�r�tjj
dd�}|�r�tjj|�}|�sfd^g}	tjdxk�r|	jda�xV|	D]>}
tj|
�}|dk�rtjj|db�}tjj|��sNd}nP�qWntjj|j
�}|�r�tjj|��r�d}|j�s�g}|j�r�tjj
d)g�}|�r�tjdc|�}|�r�||_n4tjddk�r�deg|_ntjdyk�r�dfg|_ndgg|_|j�r |j�r tjj
d6�}|�r ||_|j|_x|jD]}
dhtj|
<�q2Wttjk�r�ttdi�xXt|jj ��D]F\}}|ddjk�r��qlt!|t"��r�ttdk||�nttdl||��qlW|�s�t#�}|�s�t$|dm||f��|j%�sfxp|D]h}tjj&tjj'|��}|jtjj(�}x4t)|�D](}|dnk�r:tjj(j|�|_%P|dz=�qW|j%�r�P�q�W|j%�sft$do��|j*�sv|j%|_*i}g}|j�r�|t+d�7}|j,�r�||j,7}t-|�}ttjk�r�ttdp|�g}|dk�rtjj|dq�}tjj|��rt.dr|�|j|�|j/�r|j0|j/�g}|j�r0|t+d0�7}|j1�rB||j17}t-|�}ttjk�rbttds|�x�t2|j�D]�}|||tj3�|tjd||j|j4|j
dtdQ�du�
}t5|||||j%||j6|j7|j8�	\}}}}|j9||||�|j:�rn||ddv} x&|j:D]}!|!| k�r�t$dw|!���q�W|j;||j:|��qnWdS){Nrz(usage: %s [options ...] [build_file ...]z%sz%progz--build�configsrz0configuration for build after project generation)rtre�helpz--checkrBrgzcheck format of gyp filesz--config-dir�
config_dirrfZGYP_CONFIG_DIRz7The location for configuration files like include.gypi.)rtrerR�defaultrz-dz--debugr
Z	DEBUGMODEz�turn on a debugging mode for debugging GYP.  Supported modes are "variables", "includes" and "general" or "all" for all of them.)rt�metavarrer�rz-D�defineszVAR=VALZGYP_DEFINESzsets variable VAR to value VAL)rtrer�rRrz--depthr@�PATHrz1set DEPTH gyp variable to a relative path to PATH)rtr�rdrz-fz--format�formatsZGYP_GENERATORSFzoutput formats to generate)rtrerRrurz-G�generator_flagszFLAG=VALZGYP_GENERATOR_FLAGSzsets generator flag FLAG to VAL)rtrer�r�rRrz--generator-output�generator_outputZDIRZGYP_GENERATOR_OUTPUTz$puts generated build files under DIR)rtrer�r�rdrRrz--ignore-environmentrYrhTz.do not read options from environment variables)rtrer�rurz-Iz	--includerZINCLUDEz)files to include in all loaded .gyp files)rtrer�rdrz--no-circular-checkrCz4don't check for circular relationships between filesz--no-duplicate-basename-checkrDz#don't check for duplicate basenamesz
--no-parallelzDisable multiprocessing)rer�rz-Sz--suffix�suffixr'z suffix to add to generated files)rtr�rz--toplevel-dir�toplevel_dirz/directory to use as the root of the source tree)rtrer�r�rdrz-Rz
--root-targetr/ZTARGETz-include only TARGET and its deep dependencies)rtrer�r�HOME�cygwin�win32ZUSERPROFILEz.gypz[\s,]�darwinZxcodeZmsvsZmakerzrunning with these options:�_z
  %s: '%s'z  %s: %sz

%s: error: no build_file�srcz�Could not automatically locate src directory.  This isa temporary Chromium feature that will be removed.  Use--depth as a workaround.zcmdline_default_variables: %szinclude.gypizUsing overrides found in zgenerator_flags: %s�target_arch)
r]r"r��cwd�build_files_argZ
gyp_binary�home_dot_gypr.r/r�Zconfigurationsz(Invalid config specified via --build: %s)r�r�)r�r����)<rrrr5�argvrnZ	set_usage�replacerxrzr�rYrPr2�
expanduser�platformr�getenv�join�existsr��rer0r�Zno_parallelr.r
r�
DEBUG_GENERALr�sorted�__dict__r:�
isinstance�
basestringr$rr@r4�dirname�sep�reversedr�rTr�rOrrrjr��setrr/r>rBrCrDZGenerateOutputr~ZPerformBuild)"rZmy_name�parserZusager]r�r"�homer�Z	home_varsZhome_varZgenerate_formatsZg_orZoptionrWZ
build_fileZbuild_file_dirZbuild_file_dir_componentsZ	componentZcmdline_default_variablesr�rZdefault_includeZ	gen_flagsr�r?rArEZ	flat_listZtargets�dataZ
valid_configsZconfrrr�gyp_mainsV





















	
r�cCs>yt|�Stk
r8}ztjjd|�dSd}~XnXdS)Nzgyp: %s
r)r�rr5rk�write)r�errr�mains
r�cCsttjdd��S)Nr)r�r5r�rrrr�script_main&sr��__main__)$Z
__future__rr1Z	gyp.inputrrpZos.pathrr�rQr5rZ
gyp.commonrr��	NameError�strr
r�ZDEBUG_VARIABLESZDEBUG_INCLUDESrr$r>rOrTrXr_rmrqrnr�r�r�r{�exitrrrr�<module>sF

Q3)