Your IP : 3.141.25.125


Current Path : /opt/alt/alt-nodejs6/root/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/
Upload File :
Current File : //opt/alt/alt-nodejs6/root/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.pyc

�
�Rac@s�ddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlZddl	Z
ddlZ
ddlZddl
Z
ddlZddlZddlZddlZddlZddlZddlZddlZddlZdd	l	mZdd
l	mZddd
dgZddgZdddddddgZe�aiZiZ d�Z!dddddddddd d!d"d#d$dd%d&d'd(d)d*d+gZ"ga#dd,ddd-dd.dd%d'd*gZ$e%a&e'a(e'd/�Z)d0�Z*d1�Z+d2�Z,d3�Z-d4�Z.d5�Z/d6�Z0d7�Z1d8e2fd9��YZ3d:e4fd;��YZ5d<�Z6ed=�Z7id>d?6d@dA6dBdC6Z8dD�Z9dE�Z:ej;dF�Z<ej;dG�Z=ej;dH�Z>iZ?dI�Z@dJZAdKZBdLZCdM�ZDiZEdN�ZFdO�ZGdP�ZHdQ�ZIdR�ZJe'dS�ZKdT�ZLdU�ZMdV�ZNdW�ZOdX�ZPdY�ZQdZ�ZRd[�ZSd\�ZTd]e4fd^��YZUd_�ZVd`�ZWda�ZXdb�ZYej;dc�ZZdd�Z[e%e\de�Z]df�Z^dg�Z_dh�Z`di�Zadj�Zbdk�Zcdl�Zddm�Zedn�Zfdo�Zgdp�Zhdq�Zidr�Zjds�Zkdt�Zldu�ZmdS(vi����(tConst(tDict(tDiscard(tList(tModule(tNode(tStmtN(tGypError(t
OrderedSett
executabletshared_librarytloadable_moduletmac_kernel_extensiontdependenciestexport_dependent_settingstdestinationtfilestinclude_dirstinputst	librariestoutputstsourcescCs�x$|r&|ddkr&|d }qW|tkr7tSd|kr�|d}|ddkrj|d }n|ddkr~tS|d	d
kStS(Ni����s=+?!t_i����tsi����t_filet_pathi����t_dir(RR(t
path_sectionstTruetFalse(tsectionttail((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pyt
IsPathSection=s

tactionstconfigurationstcopiestdefault_configurationtdependencies_originalt
postbuildstproduct_dirtproduct_extensiontproduct_nametproduct_prefixtrulestrun_aststandalone_static_librarytsuppress_wildcardttarget_namettoolsetttoolsetsttypet	variablestall_dependent_settingstdirect_dependent_settingst
link_settingscCsg|dkrg}n||kr%|S|j|�x.||jdg�D]}t|||�qIW|S(sReturn a list of all build files included into build_file_path.

  The returned list will contain build_file_path as well as all other files
  that it included, either directly or indirectly.  Note that the list may
  contain files that were included into a conditional section that evaluated
  to false and was not merged into build_file_path's dict.

  aux_data is a dict containing a key for each build file or included build
  file.  Those keys provide access to dicts whose "included" keys contain
  lists of all other files included by the build file.

  included should be left at its default None value by external callers.  It
  is used for recursion.

  The returned list will not contain any duplicate entries.  Each build file
  in the list will be relative to the current directory.
  tincludedN(tNonetappendtgettGetIncludedBuildFiles(tbuild_file_pathtaux_dataR7tincluded_build_file((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pyR;�s	
cCs�tj|�}t|t�s$t�|j�}|ddksFt�t|dt�s_t�|dj�}t|dt�s�t�|dj�}t	|�dks�t�t
|dg�S(s�Return the eval of a gyp file.

  The gyp file is restricted to dictionaries and lists only, and
  repeated keys are not allowed.

  Note that this is slower than eval() is.
  iiN(tcompilertparset
isinstanceRtAssertionErrortgetChildrenR8RRtlent	CheckNode(t
file_contentstasttc1tc2tc3((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pytCheckedEval�s	c
Cs�t|t�r�|j�}i}x�tdt|�d�D]�}t||t�sYt�||j�d}||kr�td|dtt|�d�ddj	|�d��nt
|�}|j|�t||d|�||<q:W|St|t
�rl|j�}g}xOt|�D]A\}}	t
|�}|jt|��|jt|	|��q#W|St|t�r�|j�dStd	dj	|�d
t|���dS(NiisKey 's' repeated at level is with key path 't.t'sUnknown AST node at key path 's': (RARRCtrangeRDRRBRtreprtjointlistR9RERt	enumeratet	TypeError(
tnodetkeypathtctdicttntkeytkptchildrentindextchild((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pyRE�s2=
c	Cs�||kr||Stjj|�r;t|�j�}ntd|tj�f��d}y2|rut|�}nt	|idd6d�}WnKt
k
r�}||_�n-tk
r�}t
jj|d|��nXt|�tk	rtd|��n|||<i||<d|ks-|dr�y?|rRt||||||�nt||||d|�Wq�tk
r�}t
jj|d|��q�Xn|S(Ns%s not found (cwd: %s)t__builtins__swhile reading s%%s does not evaluate to a dictionary.t
skip_includesswhile reading includes of (tostpathtexiststopentreadRtgetcwdR8RKtevaltSyntaxErrortfilenamet	ExceptiontgyptcommontExceptionAppendR2RWtLoadBuildFileIncludesIntoDict(	R<tdataR=tincludest	is_targettchecktbuild_file_contentstbuild_file_datate((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pytLoadOneBuildFile�sD
	


c
Cs�g}|dkr"|j|�nd|kr�xL|dD]@}tjjtjjtjj|�|��}|j|�q9W|d=nx�|D]z}d||kr�g||d<n||dj|�tj	tj
d|�t|t|||dt
|�||�q�Wxs|j�D]e\}	}
t|
�tkrSt|
|||d|�qt|
�tkrt|
||||�qqWdS(NRoR7sLoading Included File: '%s'(R8textendR`RatnormpathRPtdirnameR9RjtDebugOutputtDEBUG_INCLUDESt
MergeDictsRuRt	iteritemsR2RWRmRQtLoadBuildFileIncludesIntoList(tsubdicttsubdict_pathRnR=RoRqt
includes_listtincludetrelative_includetktv((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pyRms.-


cCsnxg|D]_}t|�tkr;t||||d|�qt|�tkrt|||||�qqWdS(N(R2RWRmR8RQR}(tsublisttsublist_pathRnR=Rqtitem((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pyR}:s

c	Cs�d|kr|d}g}x�|D]�}d|krTd|krT|j|�q#ntrr|jddg�}n	dg}d|kr�|d=nt|�dkr#x;|dD]/}tjj|�}||d<|j|�q�W|d|d<|j|�q#q#W||d<nd|kr}x^|dD]O}t|�tkr'x4|dD]%}t|�t	krJt
|�qJqJWq'q'WndS(NttargetsR0R1ttargetiit
conditions(R9tmultiple_toolsetsR:RDRjtsimple_copytdeepcopyR2RQRWtProcessToolsetsInDict(	Rnttarget_listtnew_target_listR�R1tbuildt
new_targett	conditiontcondition_dict((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pyR�Ds4


	


c
Cs|rYtjj|tjj|��}|dkr@d|d<qY|jdd�|d<nd|kr�||dkrytS|dj|�ntj	tj
d|�t||||t|�}	||	d<d	|	kr�t
|d
��nt||�}
g|	d	<x@|
D]8}tjj|tjj|��}|	d	j|�qWt|	�t|	t||�t|	�d|	krd|	kr�t
d
|��nd}
xi|
t|	d�kr|	d|
}tjj|	d�}t||||�||	d|
<|
d7}
q�W|	d=ng}d|	kr�x_|	dD]P}d|krFq.nx5|dD])}|jtjj||d�d�qQWq.Wn|r�xn|D]Y}y#t||||||||�Wq�tk
r�}tjj|d|��q�Xq�Wn
||fSdS(NtRLtDEPTHs\t/ttarget_build_filessLoading Target Build File '%s't_DEPTHtincluded_filess$ must not contain included_files keyttarget_defaultsR�s'Unable to find targets in build file %siiR
s while loading dependencies of %s(RjRktRelativePathR`RaRxtreplaceRtaddRyRzRuRRR;R9R�t#ProcessVariablesAndConditionsInDicttPHASE_EARLYRDR�R�R{t
ResolveTargetR8tLoadTargetBuildFileRiRl(R<RnR=R3RotdepthRqtload_dependenciestdRsR7t
included_filetincluded_relativeR\told_target_dicttnew_target_dictR
ttarget_dictt
dependencyRt((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pyR�ist!







	
	

(
	c
	Cs	y�tjtjtj�x'|j�D]\}}|t�|<q&Wt|�t|tt||||t	�}	|	sx|	S|	\}}
tj
|�}|||
fSWnatk
r�}tj
jd|�dStk
r}tj
dI|IJtj
tj�IJdSXdS(s�Wrapper around LoadTargetBuildFile for parallel processing.

     This wrapper is used when LoadTargetBuildFile is executed in
     a worker process.
  sgyp: %s
s
Exception:N(tsignaltSIGINTtSIG_IGNR|tglobalstSetGeneratorGlobalsR�tper_process_datatper_process_aux_dataRtpopRtsyststderrtwriteR8Rit	tracebackt
format_exc(
tglobal_flagsR<R3RoR�Rqtgenerator_input_infoRYtvaluetresultR
RsRt((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pytCallLoadTargetBuildFile�s,

	tParallelProcessingErrorcBseZRS((t__name__t
__module__(((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pyR�	st
ParallelStatecBs eZdZd�Zd�ZRS(sClass to keep track of state when processing input files in parallel.

  If build files are loaded in parallel, use this to keep track of
  state during farming out and processing parallel jobs. It's stored
  in a global so that the callback function can have access to it.
  cCsFd|_d|_d|_d|_t�|_g|_t|_	dS(Ni(
R8tpoolR�Rntpendingtsett	scheduledR
Rterror(tself((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pyt__init__s					cCs�|jj�|s:t|_|jj�|jj�dS|\}}}||j|<|jdj|�x@|D]8}||jkrq|jj|�|j	j
|�qqqqW|jd8_|jj�|jj�dS(sJHandle the results of running LoadTargetBuildFile in another process.
    NR�i(R�tacquireRR�tnotifytreleaseRnR�R�R
R9R�(R�R�tbuild_file_path0tbuild_file_data0t
dependencies0tnew_dependency((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pytLoadTargetBuildFileCallback(s 
	




(R�R�t__doc__R�R�(((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pyR�
s	c
Cs�t�}tj�|_t|�|_t|�|_d|_||_	y�|jj
�x�|jsm|jr?|jrzPn|js�|jj�q[n|jj
�}|jd7_it�dd6t�dd6t�dd6}	|jstjtj��|_n|jjtd|	||||||fd|j�q[WWn&tk
ri}
|jj�|
�nX|jj�|jj�|jj�d|_|jr�tjd�ndS(NiiRtnon_configuration_keysR�targstcallback(R�t	threadingt	ConditionR�RQR
R�R�R�RnR�R�twaitR�R�R�tmultiprocessingtPoolt	cpu_counttapply_asyncR�R�tKeyboardInterruptt	terminateR�tcloseRPR8R�texit(tbuild_filesRnR3RoR�RqR�tparallel_stateR�R�Rt((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pytLoadTargetBuildFilesParallel=sH			
		
		




		s{[(t{t}t[t]t(t)cCs�g}d}x�t|�D]�\}}|tkrV|j|�|dkr�|}q�q|tkr|sldS|j�t|kr�dS|s�||dfSqqWdS(Ni����i(i����i����(i����i����(i����i����(RRt	LBRACKETSR9tBRACKETSR�(t	input_strtstacktstartR\tchar((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pytFindEnclosingBracketGroupss
cCs�t|�tkr|r|dkr(tS|ddkrO|d}|sOtSnd|dkojdknr||j�SqntS(s|Returns True if |string| is in its canonical integer form.

  The canonical form is such that str(int(string)) == string.
  t0it-it1t9(R2tstrRRtisdigit(tstring((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pytIsStrCanonicalInt�s
 sy(?P<replace>(?P<type><(?:(?:!?@?)|\|)?)(?P<command_string>[-a-zA-Z0-9_.]+)?\((?P<is_array>\s*\[?)(?P<content>.*?)(\]?)\))sy(?P<replace>(?P<type>>(?:(?:!?@?)|\|)?)(?P<command_string>[-a-zA-Z0-9_.]+)?\((?P<is_array>\s*\[?)(?P<content>.*?)(\]?)\))s|(?P<replace>(?P<type>[\^](?:(?:!?@?)|\|)?)(?P<command_string>[-a-zA-Z0-9_.]+)?\((?P<is_array>\s*\[?)(?P<content>.*?)(\]?)\))cCsdtjdkr`t|�tkrHtjdd|d�g|d}q`tjdd|�}n|S(Ntwin32s^cat stype ii(R�tplatformR2RQtretsub(tcmd((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pytFixupPlatformCommand�s
'iiic.
Cs�|tkrt}d}nB|tkr6t}d}n'|tkrQt}d}nts]t�t|�}t	|�rt
|�S||kr�|St|j|��}|s�|S|}|j
�x�|D]�}	|	j�}
tjtjd|
�d|
dk}|
d}d|
dk}
|	jd	�}|	jd	�}t||�\}}||}|||!}||d
}|d
}|||!}|
r�tjj|�}t||�t||||�}nt||||�}|j�}d|
dko�||k}|s
|
r>tjj|�}|dkr>|
r>d}q>n|
r�t|�tkr_|}n|jd
�}|d}tjj |�r�t!d|��nt"s�tjj#||�}nltjj |�r�t"d}tj$j%||�}n|}t"d}tjj#|||�}tj$j&|�tj$j%||�}tj$j'|�}x#|d
D]}|j(d|�qYW|j)�n�|r�t*} |
dr�t+|�}t} nt|�|f}!t,j-|!d�}"|"dkr�tjtjd||�d}|dkr�tj.�}#|r)tj/|�nzvt0j|�}$yt1|$d�}%Wn-t2k
r~}&t!d|$d|&f��nXt|%j3|$d
��j4�}Wdtj/|#�X|dks�t�n�|r�t!d||f��n�t5|�}y:t6j7|d| dt6j8dt6j8dt6j8d|�}'Wn,t9k
rX}&t!d|&||f��nX|'j:d�\}(})|'j;�dks�|)r�t<j=j(|)�t!d||'j>|f��n|(j4�}|t,|!<q:tjtjd||�|"}nJ||kr0|d d*krg}q:t!d"|d#|��n
||}t|�tkr�x\|D]T}*|d d!krSt|*�tt
fkrSt!d$|d%d&|*j?j@��qSqSWtA||||�n=t|�tt
fkr�t!d$|d%d'|j?j@��n|r8t|�tkr |}q�t0jt|��}nOd}+t|�tkretj$jB|�}+n|}+|| t|+�||}|}q�W||kr�tjtjd(|�n�tjtjd)|�t|�tkr9|r�t|d�tkr�qNg},x*|D]"}*|,jCt|*|||��q
W|,}nt||||�}t|�tkr�xbtDdtE|��D]-}-t	||-�rvt
||-�||-<qvqvWnt	|�r�t
|�}n|S(+Nt<t>t^sMatches: %rt!R2tcommand_stringt|R�it@R�t is(| cannot handle absolute paths, got "%s"ttopleveltqualified_out_dirs%s
tis_arrays(Executing command '%s' in directory '%s't
pymod_do_mains,Error importing pymod_do_mainmodule (%s): %ss$Unknown command string '%s' in '%s'.tshelltstdoutR�tstdintcwds%%s while executing command '%s' in %ss1Call to '%s' returned exit status %d while in %s.s2Had cache value for command '%s' in directory '%s'i����R�sUndefined variable s in s	Variable s- must expand to a string or list of strings; slist contains a sfound a s?Found only identity matches on %r, avoiding infinite recursion.sFound output %r, recursing.(RR�(FR�tearly_variable_ret
PHASE_LATEtlate_variable_retPHASE_LATELATEtlatelate_variable_reRRBR�R�tintRQtfinditertreverset	groupdictRjRytDEBUG_VARIABLESR�tendR�R�R�tProcessListFiltersInDicttExpandVariableststripR`RaRxR8R2tsplittisabsRtgenerator_filelist_pathsRPRkR�tEnsureDirExiststWriteOnDiffR�R�RRftcached_command_resultsR:Retchdirtshlext
__import__tImportErrortDoMaintrstripR�t
subprocesstPopentPIPERitcommunicateR�R�R�t
returncodet	__class__R�t#ProcessVariablesAndConditionsInListtEncodePOSIXShellListR9txrangeRD(.tinputtphaseR3t
build_filetvariable_retexpansion_symbolR�tmatchestoutputtmatch_grouptmatchtrun_commandRt	file_listt
replace_starttreplace_endtc_starttc_endtreplacementtcontents_starttcontents_endtcontentstprocessed_variablestexpand_to_listtbuild_file_dirt
contents_listRaRtrel_build_file_dirRtftit	use_shellt	cache_keytcached_valuetoldwdtparsed_contentst	py_moduleRttptp_stdouttp_stderrR�tencoded_replacementt
new_outputR\((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pyR�sL			


	





		




	
#			


	
	

)
"
	


	c
Cs�t|�tk	r%t|d��nt|�dkrft|d|ddtt|����nd}d
}x#|t|�kr�||}||d}t|�tk	r�tdj||t|����nt|�|dkrZt||d�tkrZ||d}	|d}|t|�krjtd	j||t|�|���qjnd
}	|d}|d
krut|||	|||�}ququW|S(s]Returns the dict that should be used or None if the result was
  that nothing should be used.s must be a listiRis  must be at least length 2, not is.{} {} must be followed by a dictionary, not {}is&{} {} has {} unexpected trailing itemsN(	R2RQRRDR�R8RWtformattEvalSingleCondition(
R�tconditions_keyR2R3R3RJR�t	cond_exprt	true_dictt
false_dict((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pyt
EvalCondition	s2,
	0
	"
c
CsFt||||�}t|�ttfkrJtdd|jj��nyZ|tkrft|}nt|dd�}|t|<t	|id	d6|�r�|S|SWn�tk
r}tdt|jd�|j
||jf|j|j|j|j
�}	|	�n<tk
rA}tjj|d||f�t|��nXd	S(
sMReturns true_dict if cond_expr evaluates to true, and false_dict
  otherwise.s7Variable expansion in this context permits str and int sonly, found s<string>RfR^s9%s while evaluating condition '%s' in %s at character %d.is%while evaluating condition '%s' in %sN(RR2R�Rt
ValueErrorR-R�tcached_conditions_aststcompileRfR8RgR�ttexttoffsetRhtlinenot	NameErrorRjRkRlR(
RYRZR[R2R3R3tcond_expr_expandedtast_codeRttsyntax_error((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pyRW,s,	

#	cCs�|tkrd}n1|tkr*d}n|tkr:dStsFt�||krVdS||}||=x[|D]S}t|||||�}|dkrnt||||�t||||�qnqnWdS(NR�ttarget_conditions(	R�RRRRBR\R8R�R{(tthe_dictR2R3R3RXtconditions_listR�t
merge_dict((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pytProcessConditionsInDictPs$		

		
cCsMxF|j�D]8\}}t|�tttfkr
||d|<q
q
WdS(NR(R|R2R�RRQ(R3RhRYR�((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pytLoadAutomaticVariablesFromDict~scCs�x�|jdi�j�D]�\}}t|�tttfkrFqn|jd�r�|d }||krqqn|dkr�||kr�||}q�n|}|||<qWdS(NR3t%i����(R:R|R2R�RRQtendswith(R3Rhtthe_dict_keyRYR�t
variable_name((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pytLoadVariablesFromVariablesDict�s%
c	CsG|j�}t||�d|krmx(|dj�D]\}}|||<q6Wt|d|||d�nt|||�x�|j�D]�\}}|dkr�t|�tkr�t||||�}t|�ttfkrt	dd|j
jd|��n|||<q�q�W|j�}t||�t|||�t||||�|j�}t||�t|||�x�|j�D]�\}}|dks�t|�tkr�q�nt|�t
kr�t|||||�q�t|�tkrt||||�q�t|�tk	r�td|j
jd|��q�q�WdS(s�Handle all variable and command expansion and conditional evaluation.

  This function is the public entry point for all variable expansions and
  conditional evaluations.  The variables_in dictionary will not be modified
  by this function.
  R3s7Variable expansion in this context permits str and int sonly, found s for s
Unknown type N(tcopyRlR|R�RqR2R�RRR]R-R�RkRWRQR.RS(	RhR2tvariables_inR3RoR3RYR�texpanded((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pyR��sD

"
"


cCsdd}xW|t|�kr_||}t|�tkrMt||||�nt|�tkrut||||�n�t|�tkrt||||�}t|�ttfkr�|||<qRt|�tkr�||||d+|t|�7}q	qRt	dd|j
jd|��n3t|�tk	rRtd|j
jd|��n|d}q	WdS(Niis7Variable expansion in this context permits strings and slists only, found s at s
Unknown type s
 at index (
RDR2RWR�RQR.R�RRR]R-R�RS(tthe_listR2R3R3R\R�Rt((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pyR.s,


cCs�i}x||dD]p}xg||jdg�D]O}tjj||d|d�}||krstd|��n|||<q.WqW|S(syBuilds a dict mapping fully-qualified target names to their target dicts.

  |data| is a dict mapping loaded build files by pathname relative to the
  current directory.  Values in |data| are build file contents.  For each
  |data| value with a "targets" key, the value of the "targets" key is taken
  as a list containing target dicts.  Each target's fully-qualified name is
  constructed from the pathname of the build file (|data| key) and its
  "target_name" property.  These fully-qualified names are used as the keys
  in the returned dict.  These keys provide access to the target dicts,
  the dicts in the "targets" lists.
  R�R�R/R0s!Duplicate target definitions for (R:RjRktQualifiedTargetR(RnR�R3R�R/((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pytBuildTargetsDict4s

cCsCgtD]}dD]}||^qq}x|j�D]\}}tjj|�}|d}x�|D]�}|j|g�}	x�tdt|	��D]�}
tjj||	|
|�\}}}
t	s�|}
ntjj
|||
�}||	|
<|dkr�||dkr�td|d|d	|d
��q�q�WqfWq7WdS(
s�Make dependency links fully-qualified relative to the current directory.

  |targets| is a dict mapping fully-qualified target names to their target
  dicts.  For each target in this dict, keys known to contain dependency
  links are examined, and any dependencies referenced will be rewritten
  so that they are fully-qualified and relative to the current directory.
  All rewritten dependencies are suitable for use as keys to |targets| or a
  similar dict.
  R�RR�R0iR
sFound s in s of s, but not in dependenciesN(R�RR�(tdependency_sectionsR|RjRkt	BuildFileR:R0RDR�R�RvR(R�tdeptoptall_dependency_sectionsR�R�ttarget_build_fileR0tdependency_keyR
R\tdep_filet
dep_targettdep_toolsetR�((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pytQualifyDependenciesNs*


			
cCs�x�|j�D]�\}}|d}tjj|�}x�tD]�}|j|g�}d}xb|t|�kr�tjj||�\}	}
}|
dkr�|dkr�|d}q]n|	|kr�td|d|d��n||=|d}||	d}x�|D]�}
t	|
jd	t
��r+qn|
d
}|
dkrS|
|krSqn|
d}|dkr{||kr{qntjj|	||�}|d}|j||�qW|d}q]Wq<Wq
WdS(s�Expands dependencies specified as build_file:*.

  For each target in |targets|, examines sections containing links to other
  targets.  If any such section contains a link of the form build_file:*, it
  is taken as a wildcard link, and is expanded to list each target in
  build_file.  The |data| dict provides access to build file dicts.

  Any target that does not wish to be included by wildcard can provide an
  optional "suppress_wildcard" key in its target dict.  When present and
  true, a wildcard dependency link will not include such targets.

  All dependency names, including the keys to |targets| and the values in each
  dependency list, must be qualified when this function is called.
  R0it*isFound wildcard in s of s referring to same build fileR�R.R/N(
R|RjRkRyRxR:RDtParseQualifiedTargetRRRRvtinsert(R�RnR�R�R0R}R~R
R\tdependency_build_filetdependency_targettdependency_toolsettdependency_target_dictstdependency_target_dicttdependency_target_nametdependency_target_toolsetR�((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pytExpandWildcardDependenciesusD






	
cCs5i}g|D]$}||kr
|j||�^q
S(s=Removes duplicate elements from l, keeping the first element.(t
setdefault(tltseenRt((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pytUnify�scCs]xV|j�D]H\}}x9tD]1}|j|g�}|r t|�||<q q Wq
WdS(sRMakes sure every dependency appears only once in all targets's dependency
  lists.N(R|RxR:R�(R�R/R�R~R
((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pytRemoveDuplicateDependencies�s

cCs5i}g|D]$}||kr
|j||�^q
S(sRemoves item from l.(R�(R�R�tresRt((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pytFilter�scCs�x�|j�D]�\}}x�tD]y}|j|g�}|r xX|D]M}||krE||jdi�jdd�r�t||�||<q�qEqEWq q Wq
WdS(sYRemove self dependencies from targets that have the prune_self_dependency
  variable set.R3tprune_self_dependencyiN(R|RxR:R�(R�R/R�R~R
tt((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pytRemoveSelfDependencies�s

"cCs�x�|j�D]�\}}x�tD]�}|j|g�}|r xh|D]]}|jdd�dkrE||jdi�jdd�r�t|||�||<q�qEqEWq q Wq
WdS(sURemove dependencies having the 'link_dependency' attribute from the 'none'
  targets.R2tnoneR3tlink_dependencyiN(R|RxR:R8R�(R�R/R�R~R
R�((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pyt%RemoveLinkDependenciesFromNoneTargets�s

"tDependencyGraphNodecBs�eZdZdefd��YZd�Zd�Zd�Zd�Zdd�Z
dd�Zdd	�Zdd
�Z
ded�Zd�Zd
�ZRS(s�

  Attributes:
    ref: A reference to an object that this DependencyGraphNode represents.
    dependencies: List of DependencyGraphNodes on which this one depends.
    dependents: List of DependencyGraphNodes that depend on this one.
  tCircularExceptioncBseZRS((R�R�(((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pyR��scCs||_g|_g|_dS(N(trefR
t
dependents(R�R�((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pyR��s		cCsd|jS(Ns<DependencyGraphNode: %r>(R�(R�((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pyt__repr__�scCs�t�}t|j�}x�|r�|j�}|j|j�xZ|jD]O}t}x*|jD]}|j|kr^t}Pq^q^W|rH|j|�qHqHWqWt	|�S(N(
RR�R�R�R�R�RR
RRQ(R�t	flat_listtin_degree_zerosRTtnode_dependenttis_in_degree_zerotnode_dependent_dependency((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pyt
FlattenToList�s		csEg�t�����fd���j|��||g��S(sR
    Returns a list of cycles in the graph, where each cycle is its own list.
    cs|xu|jD]j}||krD�j|g||j|�d �q
|�kr
�j|��||g|�q
q
WdS(Ni(R�R9R\R�(RTRaR](tVisittresultstvisited(sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pyR�3s(
(R�R�(R�((R�R�R�sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pyt
FindCycles,s	
cCs^|dkrg}nxB|jD]7}|jdkr|j|kr|j|j�qqW|S(s+Returns a list of just direct dependencies.N(R8R
R�R9(R�R
R�((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pytDirectDependencies@s	cCs�|dkrg}nd}x�|t|�kr�||}||}d}xG|jdg�D]3}||kr]|j|||�|d}q]q]W|d}qW|S(s^Given a list of direct dependencies, adds indirect dependencies that
    other dependencies have declared to export their settings.

    This method does not operate on self.  Rather, it operates on the list
    of dependencies in the |dependencies| argument.  For each dependency in
    that list, if any declares that it exports the settings of one of its
    own dependencies, those dependencies whose settings are "passed through"
    are added to the list.  As new items are added to the list, they too will
    be processed, so it is possible to import settings through multiple levels
    of dependencies.

    This method is not terribly useful on its own, it depends on being
    "primed" with a list of direct dependencies such as one provided by
    DirectDependencies.  DirectAndImportedDependencies is intended to be the
    public entry point.
    iiRN(R8RDR:R�(R�R�R
R\R�tdependency_dictt	add_indextimported_dependency((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pyt_AddImportedDependenciesLs	

cCs|j|�}|j||�S(s�Returns a list of a target's direct dependencies and all indirect
    dependencies that a dependency has advertised settings should be exported
    through the dependency for.
    (R�R�(R�R�R
((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pytDirectAndImportedDependenciesuscCst|dkrt�}nxU|jD]J}|jdkr=q"n|j|kr"|j|�|j|j�q"q"W|S(sEReturns an OrderedSet of all of a target's dependencies, recursively.N(R8RR
R�tDeepDependenciesR�(R�R
R�((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pyR�~s
cCs{|dkrt�}n|jdkr+|Sd||jkrMtd��nd||jkr~td||jd��n||jd}|tk}|r�|r�|S|dkr�||jjdt�r�|j|j�|S|r�|dkr�|S|r|d
kr|r|S|j|krw|j|j�|sG|rwx*|jD]}|j	|||t
�qQWqwn|S(
suReturns an OrderedSet of dependency targets that are linked
    into this target.

    This function has a split personality, depending on the setting of
    |initial|.  Outside callers should always leave |initial| at its default
    setting.

    When adding a target to the list of dependencies, this function will
    recurse into itself with |initial| set to False, to collect dependencies
    that are linked into the linkable target for which the list is being built.

    If |include_shared_libraries| is False, the resulting dependencies will not
    include shared_library targets that are linked into this target.
    R/s&Missing 'target_name' field in target.R2s!Missing 'type' field in target %sR�tdependencies_traverseR	RRR
N(R	RR(R8RR�Rtlinkable_typesR:RR�R
t_LinkDependenciesInternalR(R�R�tinclude_shared_librariesR
tinitialttarget_typetis_linkableR�((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pyR��s>

	
	cCs)||jjdt�}|j||�S(si
    Returns a list of dependency targets whose link_settings should be merged
    into this target.
    t(allow_sharedlib_linksettings_propagation(R�R:RR�(R�R�R�((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pytDependenciesForLinkSettings�scCs|j|t�S(sP
    Returns a list of dependency targets that are linked into this target.
    (R�R(R�R�((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pytDependenciesToLinkAgainst�sN(R�R�R�RR�R�R�R�R�R8R�R�R�R�RR�R�R�(((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pyR��s			-	)	U	cCsi}x9|j�D]+\}}||krt|�||<qqWtd�}x�|j�D]�\}}||}tjj|�}|jd�}|s�|g|_|jj	|�q[x\|D]T}|j|�}	|	s�t
d||f��n|jj	|	�|	jj	|�q�Wq[W|j�}
t|
�t|�kr�|js�|j
�d}||}|jj	|�|jj	|�ng}xJ|j�D]<}g|D]}
|
j^q�}|j	ddj|��q�Wtjddj|���n||
gS(NR
s8Dependency '%s' not found while trying to load target %sis	Cycle: %ss -> s%Cycles in dependency graph detected:
s
(R|R�R8RjRkRyR:R
R�R9RR�RDtkeysR�R�RPR�(R�tdependency_nodesR�tspect	root_nodettarget_nodeR}R
R�tdependency_nodeR�tcyclestcycleRTtpaths((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pytBuildDependencyList�sB

	
cCs�i}xE|j�D]7}tjj|�}||krt|�||<qqWx|j�D]�\}}tjj|�}||}|jdg�}x�|D]�}ytjj|�}Wn-tk
r�}	tjj|	d|��nX||kr�q�n|j|�}
|
s"td|��n|
|j	kr�|j	j
|
�|
jj
|�q�q�Wq[Wtd�}xL|j
�D]>}t|j	�dkru|j	j
|�|jj
|�ququW|j�}t|�t|�kr�|js|j�d}
|
j	j
|�|jj
|
�ng}xJ|j�D]<}g|D]}|j^q7}|j
ddj|��q*Wtjddj|���ndS(	NR
s,while computing dependencies of .gyp file %ssDependancy '%s' not foundis	Cycle: %ss -> s/Cycles in .gyp file dependency graph detected:
s
(titerkeysRjRkRyR�R|R:RRlR
R9R�R8t
itervaluesRDR�tvaluesR�R�RPR�(R�R�R�R3R�tbuild_file_nodettarget_dependenciesR�R�RtR�R�R�t	file_nodeR�R�RTR�((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pyt#VerifyNoGYPFileCircularDependencies,sR

		cCs�x�|D]�}||}tjj|�}|dkrH||j�}nT|dkrj||j|�}n2|dkr�||j|�}ntd|��xS|D]K}||}	||	kr�q�ntjj|�}
t||	|||
�q�WqWdS(NR4R5R6sCDoDependentSettings doesn't know how to determine dependencies for (RjRkRyR�R�R�RR{(RYR�R�R�R�R�R3R
R�R�R�((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pytDoDependentSettingsgs$





c
Cs�x�|D]�}||}|d}|dkrd|kr?qn|jdg�|d<||j|�}d}x�|t|�kr�||}	||	}
|
ddkr�|
jdt�s�|
ddkr�|	|dkr�||=qr|d}qrWt|�dkr||d<q�|d=q|tkr||j|�}x]|D]U}	|	|krZqBnd|krsg|d<n|	|dkrB|dj|	�qBqBW|r�d|kr�gt|�D]}||dkr�|^q�|d<q�qqWdS(NR2tstatic_libraryR
R%ithard_dependencyi(R:R�RDRR�R�R9treversed(
R�R�R�tsort_dependenciesR�R�R�R
R\R�R�tlink_dependenciesRz((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pytAdjustStaticLibraryDependencies�sD









s
["']?[-/$<>^]cCs�||kstj|�r|Stjjtjjtjjtjj	|�tjj	|��|��j
dd�}|ddkr�|d7}n|SdS(Ns\R�i����(texception_reR9R`RaRwRPRjRkR�RxR�(tto_filetfro_fileR�tret((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pytMakePathRelative�s
cs�d���fd�}d}t�fd�|D��}x�|D]�}	t}
t|	�ttfkr�|r�t|||	�}n|	}t|	�tko�|	jd�s%t}
q%nrt|	�tkr�i}t	||	||�nDt|	�t
krg}t||	||�ntd|	j
j��|rt|
sE||||�r�|j|��|�rq|j|�qqq�qAx#|
r�||kr�|j|�qwW|j||��|�r�|j|�n|d}qAWdS(NcSs|jS(N(t__hash__(tval((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pyt<lambda>�R�cs �|�r||kS||kS(N((txRR�(tis_hashable(sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pytis_in_set_or_list�s
ic3s!|]}�|�r|VqdS(N((t.0R�(R�(sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pys	<genexpr>sR�s/Attempt to merge list item of unsupported type i(R�RR2R�RR�t
startswithRRWR{RQt
MergeListsRSR-R�R9R�tremoveR�(ttotfroR�R�tis_pathsR9R�t
prepend_indexthashable_to_setR�t	singletontto_item((R�sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pyR��s@	
!
cCs=x6|j�D](\}}||kr�t}t|�ttfkrkt||�ttfkr�t}q�n%t|�t||�k	r�t}n|r�td|jjd||jjd|��q�nt|�ttfkrt	|�}|rt
|||�||<q5|||<q
t|�tkra||krGi||<nt|||||�q
t|�t
kr|d}t}	|dkr�|d }
|
|
dg}g||
<n}|dkr�|d }
|
d|
dg}t}	nJ|dkr|d }
|
|
d|
dg}n|}
|
d|
dg}x5|D]-}||kr:td|d	|��q:q:W|
|kr�|dkr�q
q�t||
�t
k	r�td|jjd||
jjd|
d
|d��q�n
g||
<t	|
�}
t||
||||
|	�q
td|jjd|��q
WdS(
Ns$Attempt to merge dict value of type s into incompatible type s	 for key i����t=t?t+sIncompatible list policies s and R�R�s0Attempt to merge dict value of unsupported type (R|RR2R�RRRSR-R�R R�RWR{RQRR�(R�R�R�R�R�R�t	bad_mergetis_pathtextR9t	list_basetlists_incompatibletlist_incompatibleR�((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pyR{=sf	3





	

?
 cCs�||krdS|d|}x7|jdg�D]#}t||||||g�q1Wt||||�d|kr�|d=ndS(NR"tinherit_fromtabstract(R:tMergeConfigWithInheritanceR{(tnew_configuration_dictR3R�t
configurationR�tconfiguration_dicttparent((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pyR��s		
cCs�dddddg}tjj|�}d|krGiid6|d<nd|kr�g|dj�D]!\}}|jd	�sd|^qd}t|�d
|d<ni}|d}x�|j�D]�\}	}
|
jd	�r�q�ni}xh|j�D]Z\}}
|d}||kr"|d }n|}|tkr�tjj|
�||<q�q�Wt	||||	g�|||	<q�Wx&|j
�D]}	||	|d|	<q�WxC|dj
�D]1}	|d|	}
|
jd	�r�|d|	=q�q�Wg}xS|D]K}|d}||kr|d }n|}|tkr�|j|�q�q�Wx|D]
}||=qGWxe|dj
�D]S}	|d|	}x<|j
�D].}|tkr�t
d||	|f��q�q�WqiWdS(
NR�R�R�RR�R"tDefaultR$R�ii����s:%s not allowed in the %s configuration, found in target %s(RjRkRyR|R:tsortedR�R�R�R�R�R9tinvalid_configuration_keysR(R�R�tkey_suffixesR3RJtconfigtconcretetmerged_configurationstconfigsR�told_configuration_dictR�RYt
target_valtkey_exttkey_basetdelete_keysR�((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pytSetUpConfigurations�s\


	




cCs�g}g}x|j�D]\}}|d}|dkrM|dkrMqnt|�tk	r�t|d|d|jj��n|d }||kr�|j|�qnt||�tk	r||}t|d|d|jjdidd6dd6|��n||kr|j|�qqWx|D]
}||=q3WxE|D]=}||}	tdt|	��}
|d}||kr�xO||D]C}x:td	t|	��D]#}
||	|
kr�d	|
|
<q�q�Wq�W||=n|d}||kr�x�||D]�}|\}}t	j
|�}|d
kr:d	}n5|dkrOd}n td
|d|d|��xYtd	t|	��D]B}
|	|
}|
|
|kr�q�n|j|�r�||
|
<q�q�WqW||=n|d}||krt|d|d|��ng}xRtt|
�ddd�D]4}
|
|
d	kr1|j
d	|	|
�|	|
=q1q1Wt|�d	krK|||<qKqKWx^|j�D]P\}}t|�tkr�t||�q�t|�tkr�t||�q�q�WdS(s�Process regular expression and exclusion-based filters on lists.

  An exclusion list is in a dict key named with a trailing "!", like
  "sources!".  Every item in such a list is removed from the associated
  main list, which in this example, would be "sources".  Removed items are
  placed into a "sources_excluded" list in the dict.

  Regular expression (regex) filters are contained in dict keys named with a
  trailing "/", such as "sources/" to operate on the "sources" list.  Regex
  filters in a dict take the form:
    'sources/': [ ['exclude', '_(linux|mac|win)\.cc$'],
                  ['include', '_mac\.cc$'] ],
  The first filter says to exclude all files ending in _linux.cc, _mac.cc, and
  _win.cc.  The second filter then includes all files ending in _mac.cc that
  are now or were once in the "sources" list.  Items matching an "exclude"
  filter are subject to the same processing as would occur if they were listed
  by name in an exclusion list (ending in "!").  Items matching an "include"
  filter are brought back into the main list if previously excluded by an
  exclusion list or exclusion regex filter.  Subsequent matching "exclude"
  patterns can still cause items to be excluded after matching an "include".
  i����RR�s key s must be list, not s when applying t	exclusiontregexitexcludeR�isUnrecognized action s in t	_excludedsD must not be present prior  to applying exclusion/regex filters for N(i����(R|R2RQR]R-R�R9RDR0R�R_tsearchRR�RWRtProcessListFiltersInList(tnameRhtlistst	del_listsRYR�t	operationtlist_keytdel_listRutlist_actionstexclude_keytexclude_itemR\t	regex_keyt
regex_itemtactiontpatternt
pattern_retaction_valuet	list_itemtexcluded_keyt
excluded_list((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pyR	s�









		


#cCsYxR|D]J}t|�tkr/t||�qt|�tkrt||�qqWdS(N(R2RWRRQR(R
RuR�((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pyR�	s

cCs�d}|jdd
�}||krItd||d	j|�f��n|jd
d�r�|dkr�td||f��nd
S(s�Ensures the 'type' field on the target is one of the known types.

  Arguments:
    target: string, name of target.
    target_dict: dict, target spec.

  Raises an exception on error.
  R	RR�R
RR�R2s>Target %s has an invalid target type '%s'.  Must be one of %s.R�R-is_Target %s has type %s but standalone_static_library flag is only valid for static_library type.N(R	RR�R
RR�(R:R8RRP(R�R�tVALID_TARGET_TYPESR�((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pytValidateTargetType�	s	
c

Cs)|s
dS|jdd�dkr&dS|jdg�}i}xi|D]a}tjj|�\}}|dk}	|	s{qEntjj|�}
|j|
g�j|�qEWd}xL|j�D]>\}
}t	|�d
kr�|d|
dj
|�f7}q�q�W|r%d||dGHtd��ndS(NR2R�Rs.cs.ccs.cpps.cxxs.ms.mms.ss.SR�is	  %s: %s
Rs<static library %s has several files with the same basename:
s`libtool on Mac cannot handle that. Use --no-duplicate-basename-check to disable this validation.s6Duplicate basenames in sources section, see list above(s.cs.ccs.cpps.cxxs.ms.mms.ss.S(R:R8R`RatsplitexttbasenameR�R9R|RDRPR(
R�R�R3tduplicate_basename_checkRt	basenamestsourceR
R�tis_compiled_fileR"R�R((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pytValidateSourcesInTarget�	s*
	$cCs�i}i}|jdg�}x�|D]�}|d}||krZtd||f��n|||<|d}|jd�r�|d}n||kr�tdd||||d|f��n|||<d	|kr�td
||f��ng}	dg}
|
j|�x{|
D]s}xj|j|g�D]V}tjj|�\}
}|jd�rf|d}n||kr,|	j|�q,q,WqWt|	�dkr%|	|d	<q%q%Wd
S(s]Ensures that the rules sections in target_dict are valid and consistent,
  and determines which sources they apply to.

  Arguments:
    target: string, name of target.
    target_dict: dict, target spec containing "rules" and "sources" lists.
    extra_sources_for_rules: a list of keys to scan for rule matches in
        addition to 'sources'.
  R+t	rule_names&rule %s exists in duplicate, target %st	extensionRLis-extension %s associated with multiple rules, starget %s rules %s and %strule_sourcess7rule_sources must not exist in input, target %s rule %sRiN(	R:RR�RvR`RaR!R9RD(R�R�textra_sources_for_rulest
rule_namestrule_extensionsR+truleR(trule_extensionR*tsource_keyst
source_keyR%tsource_roottsource_extension((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pytValidateRulesInTarget�	sF






	


cCs0|jd�}|jd�}|s(dSt|�tk	rStd||f��n|jd�}|s�td||f��nt|�tk	r�td||f��n|jd�}|r�t|�tk	r�td||f��n|jd	�}|r,t|�tk	r,td
||f��ndS(NR/R,s>The 'run_as' in target %s from file %s should be a dictionary.RsEThe 'run_as' in target %s from file %s must have an 'action' section.sCThe 'action' for 'run_as' in target %s from file %s must be a list.tworking_directorysPThe 'working_directory' for 'run_as' in target %s in file %s should be a string.tenvironmentsNThe 'environment' for 'run_as' in target %s in file %s should be a dictionary.(R:R2RWRRQR�(R�R�R3R/R,RR5R6((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pytValidateRunAsInTarget
s,c	Cs�|jd�}|jdg�}x�|D]�}|jd�}|sVtd|��n|jdd
�}|d
kr�td|��n|jd�}|r(|dr(td	|��q(q(Wd
S(s0Validates the inputs to the actions in a target.R/R!taction_namesKAnonymous action in target %s.  An action must have an 'action_name' field.Rs"Action in target %s has no inputs.Ris%Empty action as command in target %s.N(R:RR8(	R�R�R3R/R!RR8Rtaction_command((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pytValidateActionsInTarget:
s

cCs�x�|j�D]�\}}t|�tkrDt|�}|||<n>t|�tkrct|�nt|�tkr�t|�nt|�tkr
||=||t|�<q
q
WdS(sGGiven dict the_dict, recursively converts all integers into strings.
  N(titemsR2RR�RWtTurnIntIntoStrInDictRQtTurnIntIntoStrInList(RhR�R�((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pyR<L
s


cCs�x�tdt|��D]s}||}t|�tkrKt|�||<qt|�tkrjt|�qt|�tkrt|�qqWdS(sGGiven list the_list, recursively converts all integers into strings.
  iN(	R0RDR2RR�RWR<RQR=(RuR\R�((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pyR=_
s

cCsog}xU|D]M}|j�}tjj||�}|sMtd|��n|j|�q
Wi}xE|D]=}||||<x&||j�D]}	||	||	<q�WqkWg|D]}
|
|kr�|
^q�}x�|dD]�}d||kr�q�ng}
xR||dD]B}tjj||d|d�}||kr
|
j|�q
q
W|
||d<q�W||fS(sEReturn only the targets that are deep dependencies of |root_targets|.sCould not find target %sR�R�R/R0(	RRjRktFindQualifiedTargetsRRvR�RvR9(R�R�R�troot_targetsRntqualified_root_targetsR�tqualified_targetstwanted_targetsR�R�twanted_flat_listR3tnew_targetstqualified_name((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pytPruneUnwantedTargetsl
s2

%
cCs�i}x�|D]�}|jdd�\}}tjj|�\}}|sRd}n|d|}||kr�td|||||f��n|||<q
WdS(s�Verify that no two targets in the same directory share the same name.

  Arguments:
    targets: A list of targets in the form 'path/to/file.gyp:target_name'.
  t:iRLsHDuplicate target name "%s" in directory "%s" used both in "%s" and "%s".N(trsplitR`RaRR(R�tusedR�RaR
tsubdirRjRY((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pytVerifyNoCollidingTargets�
s
	cCsMtt�atj|d�tatj|d�|da|dadS(NRR�t$generator_supports_multiple_toolsetsR(	R�tbase_path_sectionsRtupdatetbase_non_configuration_keysR�RvR�R(R�((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pyR��
sc

Cs�t|�|d}
it�d6}tttjj|��}|rdt|||||||�nji}xa|D]Y}
y#t|
||||||t�Wqqt	k
r�}t
jj|d|
��qqXqqWt
|�}t|�t|�t||�t|�x�|j�D]�\}}i}xMtD]E}x<dD]4}||}||kr8||||<||=q8q8Wq+Wt||�x|D]}||||<q�WqWt|�|r�t|�nt|�\}}|	r�t||||	|�\}}nt|�xYddd	gD]H}t||||�x,|D]$}|||kr4|||=q4q4WqW|}|d
r�t||||d�nx=|D]5}||}t
jj|�}
t|t||
�q�Wx%|D]}||}t||�q�Wx%|D]}||}t||�q�Wx=|D]5}||}t
jj|�}
t|t ||
�q!Wxz|D]r}||}t
jj|�}
t!||�t"|||
|�t#|||
�t$|||
�t%|||
�qaWt&|�|||gS(
NR+R�swhile trying to load %sR�RR�R4R5R6t4generator_wants_static_library_dependencies_adjustedt#generator_wants_sorted_dependencies(R�RR�('R�R�tmapR`RaRwR�R�RRiRjRkRlRwR�R�R�R�R|RxRR�R�R�RFRKR�R�RyR�RRRR R'R4R7R:R<(R�R3RoR�R�Rqtcircular_checkR#tparallelR?R+RnR=R3RtR�R/R�ttmp_dictRR{RYR�R�t
settings_typeR�tgii((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pytLoad�
s�

	




























(ntcompiler.astRRRRRRRR?t
gyp.commonRjtgyp.simple_copyR�toptparsetos.pathR`R�R#R�R(R�R�ttimeR�RRR�RxRMR�RR�R�R ROR�R�RR�R8RR;RKRERuRmR}R�R�R�RiR�tobjectR�R�R�R�R�R�R_RRRR!R�R�RRRR^R\RWRkRlRqR�R.RwR�R�R�R�R�R�R�R�R�R�R�R�R�R�RR�R{R�RRRR R'R4R7R:R<R=RFRKR�RX(((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pyt<module>s 						!			0	'	
	%	s	-0	4								�C	#	$	.		o	"		'	E		
		
	�	2	;		N	 H	c		P	�				:				
	#		

?>