Your IP : 18.217.241.235


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.pyo

�
�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	
cCsLtj|�}|j�}|dj�}|dj�}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.
  ii(tcompilertparsetgetChildrent	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]�}||j�d}||kr�td|dtt|�d�ddj|�d��nt|�}|j	|�t
||d|�||<q:W|St|t�rS|j�}g}xOt|�D]A\}}	t|�}|j	t|��|j	t
|	|��q
W|St|t
�rp|j�dStd	dj|�d
t|���dS(NiisKey 's' repeated at level is with key path 't.t'sUnknown AST node at key path 's': (t
isinstanceRRAtrangetlenRtreprtjointlistR9RBRt	enumerateRt	TypeError(
tnodetkeypathtctdicttntkeytkptchildrentindextchild((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pyRB�s0=
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 (tostpathtexiststopentreadRtgetcwdR8RHtevaltSyntaxErrortfilenamet	ExceptiontgyptcommontExceptionAppendR2RVtLoadBuildFileIncludesIntoDict(	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(NRnR7sLoading Included File: '%s'(R8textendR_R`tnormpathROtdirnameR9RitDebugOutputtDEBUG_INCLUDESt
MergeDictsRtRt	iteritemsR2RVRlRPtLoadBuildFileIncludesIntoList(tsubdicttsubdict_pathRmR=RnRpt
includes_listtincludetrelative_includetktv((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pyRls.-


cCsnxg|D]_}t|�tkr;t||||d|�qt|�tkrt|||||�qqWdS(N(R2RVRlR8RPR|(tsublisttsublist_pathRmR=Rptitem((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:RMRitsimple_copytdeepcopyR2RPRVtProcessToolsetsInDict(	Rmttarget_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(NtRItDEPTHs\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(RiRjtRelativePathR_R`RwtreplaceRtaddRxRyRtRRR;R9R�t#ProcessVariablesAndConditionsInDicttPHASE_EARLYRMR�R�Rzt
ResolveTargetR8tLoadTargetBuildFileRhRk(R<RmR=R3RntdepthRptload_dependenciestdRrR7t
included_filetincluded_relativeR[told_target_dicttnew_target_dictR
ttarget_dictt
dependencyRs((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_dataRtpopRtsyststderrtwriteR8Rht	tracebackt
format_exc(
tglobal_flagsR<R3RnR�Rptgenerator_input_infoRXtvaluetresultR
RrRs((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�Rmtpendingtsett	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�tnotifytreleaseRmR�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�RPR
R�R�R�RmR�R�twaitR�R�R�tmultiprocessingtPoolt	cpu_counttapply_asyncR�R�tKeyboardInterruptt	terminateR�tcloseROR8R�texit(tbuild_filesRmR3RnR�RpR�tparallel_stateR�R�Rs((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����(RQt	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�tplatformR2RPtretsub(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}n6|tkr6t}d}n|tkrQt}d}nt|�}t|�rst|�S||kr�|St	|j
|��}|s�|S|}|j�x�|D]�}	|	j�}
t
jt
jd|
�d|
dk}|
d}d|
dk}
|	jd	�}|	jd	�}t||�\}}||}|||!}||d
}|d
}|||!}|
r�t
jj|�}t||�t||||�}nt||||�}|j�}d|
dko�||k}|s|
r2tjj|�}|dkr2|
r2d}q2n|
rut|�t	krS|}n|jd
�}|d}tjj|�r�td|��nt s�tjj!||�}nltjj|�r�t d}t
j"j#||�}n|}t d}tjj!|||�}t
j"j$|�t
j"j#||�}t
j"j%|�}x#|d
D]}|j&d|�qMW|j'�n�|r�t(} |
dr�t)|�}t*} nt|�|f}!t+j,|!d�}"|"dkr�t
jt
jd||�d}|dkr�tj-�}#|rtj.|�nzvt/j|�}$yt0|$d�}%Wn-t1k
rr}&td|$d|&f��nXt|%j2|$d
��j3�}Wdtj.|#�Xn�|r�td||f��n�t4|�}y:t5j6|d| dt5j7dt5j7dt5j7d|�}'Wn,t8k
r:}&td|&||f��nX|'j9d�\}(})|'j:�dksh|)r�t;j<j&|)�td||'j=|f��n|(j3�}|t+|!<qt
jt
jd||�|"}nJ||kr|d d*kr�g}qtd"|d#|��n
||}t|�t	kr�x\|D]T}*|d d!kr5t|*�ttfkr5td$|d%d&|*j>j?��q5q5Wt@||||�n=t|�ttfkr�td$|d%d'|j>j?��n|rt|�t	kr|}qit/jt|��}nOd}+t|�t	krGt
j"jA|�}+n|}+|| t|+�||}|}q�W||kr�t
jt
jd(|�n�t
jt
jd)|�t|�t	kr|r�t|d�t	kr�q0g},x*|D]"}*|,jBt|*|||��q�W|,}nt||||�}t|�t	kr�xbtCdtD|��D]-}-t||-�rXt||-�||-<qXqXWnt|�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�(ER�tearly_variable_ret
PHASE_LATEtlate_variable_retPHASE_LATELATEtlatelate_variable_reR�R�tintRPtfinditertreverset	groupdictRiRxtDEBUG_VARIABLESR�tendR�R�R�tProcessListFiltersInDicttExpandVariableststripR_R`RwR8R2tsplittisabsRtgenerator_filelist_pathsRORjR�tEnsureDirExiststWriteOnDiffR�R�RReRtcached_command_resultsR:Rdtchdirtshlext
__import__tImportErrortDoMaintrstripR�t
subprocesstPopentPIPERhtcommunicateR�R�R�t
returncodet	__class__R�t#ProcessVariablesAndConditionsInListtEncodePOSIXShellListR9txrangeRM(.tinputtphaseR3t
build_filetvariable_retexpansion_symbolR�tmatchestoutputtmatch_grouptmatchtrun_commandRt	file_listt
replace_starttreplace_endtc_starttc_endtreplacementtcontents_starttcontents_endtcontentstprocessed_variablestexpand_to_listtbuild_file_dirt
contents_listR`Rtrel_build_file_dirRtftit	use_shellt	cache_keytcached_valuetoldwdtparsed_contentst	py_moduleRstptp_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�sJ			


	





		




	
#			


	
	

)
"
	


	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(	R2RPRRMR�R8RVtformattEvalSingleCondition(
R�tconditions_keyR1R3R2RIR�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>ReR]s9%s while evaluating condition '%s' in %s at character %d.is%while evaluating condition '%s' in %sN(RR2R�Rt
ValueErrorR,R�tcached_conditions_aststcompileReR8RfR�ttexttoffsetRgtlinenot	NameErrorRiRjRkR(
RXRYRZR1R3R2tcond_expr_expandedtast_codeRstsyntax_error((sg/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/pylib/gyp/input.pyRV,s,	

#	cCs�|tkrd}n%|tkr*d}n|tkr:dS||krJdS||}||=x[|D]S}t|||||�}|dkrbt||||�t||||�qbqbWdS(NR�ttarget_conditions(R�RRR[R8R�Rz(tthe_dictR1R3R2RWtconditions_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�RRP(R3RgRXR�((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�RRPtendswith(R3Rgtthe_dict_keyRXR�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(tcopyRkR{R�RpR2R�RRR\R,R�RjRVRPR-RR(	RgR1tvariables_inR2RnR3RXR�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 (
RMR2RVR�RPR-R�RRR\R,R�RR(tthe_listR1R3R2R[R�Rs((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:RiRjtQualifiedTargetR(RmR�R2R�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{RiRjt	BuildFileR:R/RMR�R�RuR(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{RiRjRxRwR:RMtParseQualifiedTargetRRRRutinsert(R�RmR�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(tltseenRs((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{RwR: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�tresRs((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{RwR: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{RwR: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
RRP(R�t	flat_listtin_degree_zerosRStnode_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�(RSR`R\(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(R8RMR: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�R8RiRjRxR:R
R�R9RR�RMtkeysR�R�ROR�(R�tdependency_nodesR�tspect	root_nodettarget_nodeR|R
R�tdependency_nodeR�tcyclestcycleRStpaths((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
(titerkeysRiRjRxR�R{R:RRkR
R9R�R8t
itervaluesRMR�tvaluesR�R�ROR�(R�R�R�R2R�tbuild_file_nodettarget_dependenciesR�R�RsR�R�R�t	file_nodeR�R�RSR�((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 (RiRjRxR�R�R�RRz(RXR�R�R�R�R�R2R
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�RMRR�R�R9treversed(
R�R�R�tsort_dependenciesR�R�R�R
R[R�R�tlink_dependenciesRy((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_reR8R_R`RvRORiRjR�RwR�(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
startswithRRVRzRPt
MergeListsRRR,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�RRRRR,R�R R�RVRzRPRR�(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.pyRz=sf	3





	

?
 cCs�||krdS|d|}x7|jdg�D]#}t||||||g�q1Wt||||�d|kr�|d=ndS(NR"tinherit_fromtabstract(R:tMergeConfigWithInheritanceRz(tnew_configuration_dictR2R�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(RiRjRxR{R:tsortedR�R�R�R�R�R9tinvalid_configuration_keysR(R�R�tkey_suffixesR2RItconfigtconcretetmerged_configurationstconfigsR�told_configuration_dictR�RXt
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{R2RPR\R,R�R9RMR/R�R^tsearchRR�RVRtProcessListFiltersInList(tnameRgtlistst	del_listsRXR�t	operationtlist_keytdel_listRtt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(R2RVRRPR(RRtR�((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:R8RRO(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_R`tsplitexttbasenameR�R9R{RMROR(
R�R�R2tduplicate_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	extensionRIis-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�RuR_R`R R9RM(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:R2RVRRPR�(R�R�R2R/R,RR4R5((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�R2R/R!RR7Rtaction_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�RVtTurnIntIntoStrInDictRPtTurnIntIntoStrInList(RgR�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(	R/RMR2RR�RVR;RPR<(RtR[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(	RRiRjtFindQualifiedTargetsRRuR�RuR9(R�R�R�troot_targetsRmtqualified_root_targetsR�tqualified_targetstwanted_targetsR�R�twanted_flat_listR2tnew_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:iRIsHDuplicate target name "%s" in directory "%s" used both in "%s" and "%s".N(trsplitR_R`RR(R�tusedR�R`RtsubdirRiRX((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�RuR�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_R`RvR�R�RRhRiRjRkRvR�R�R�R�R{RwRR�R�R�RERJR�R�RxR�RRRRR&R3R6R9R;(R�R3RnR�R�Rptcircular_checkR"tparallelR>R*RmR=R2RsR�R/R�ttmp_dictRRzRXR�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.commonRitgyp.simple_copyR�toptparsetos.pathR_R�R"R�R'R�R�ttimeR�RRR�RwRLR�RR�R�R RNR�R�RR�R8RR;RHRBRtRlR|R�R�R�RhR�tobjectR�R�R�R�R�R�R^R
RRR R�R�RRRR]R[RVRjRkRpR�R-RvR�R�R�R�R�R�R�R�R�R�R�R�R�R�RR�RzR�RRRRR&R3R6R9R;R<RERJR�RW(((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	�				:				
	#		

?>