Your IP : 3.147.82.108


Current Path : /opt/alt/alt-nodejs8/root/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/
Upload File :
Current File : //opt/alt/alt-nodejs8/root/lib/node_modules/npm/node_modules/node-gyp/gyp/tools/graphviz.pyo

�
��Rac@s�dZddlmZddlZddlZddlZd�Zd�Zd�Zd�Z	e
dkr}eje	��ndS(	s�Using the JSON dumped by the dump-dependency-json generator,
generate input suitable for graphviz to render a dependency graph of
targets.i����(tprint_functionNcCs=|jd�\}}}|jd�\}}}|||fS(Nt#t:(t	partition(ttargett_tsuffixtfilename((sf/opt/alt/alt-nodejs8/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/tools/graphviz.pytParseTargetscCs�td�}tj|�}|j�i}|}xG|r{|j�}||krYq5n||||<|j||�q5W|S(spLoad the edges map from the dump file, and filter it to only
  show targets in |targets| and their depedendents.s	dump.json(topentjsontloadtclosetpoptextend(Rttargetstfiletedgesttarget_edgestto_visittsrc((sf/opt/alt/alt-nodejs8/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/tools/graphviz.pyt	LoadEdgess
	cCs�tjt�}x@|j�D]2\}}t|�\}}}||j|�qWtd�td�td�x�|j�D]�\}}t|�dkr�|d}	t|	�\}}}td|	||f�q}td|�td|�x7|D]/}	t|	�\}}}td	|	|f�q�Wtd
�q}Wx?|j�D]1\}}
x"|
D]}td||f�qXWqEWtd�d
S(shPrint a graphviz graph to stdout.
  |edges| is a map of target to a list of other targets it depends on.sdigraph D {s  fontsize=8s  node [fontsize=8]iis"  "%s" [shape=box, label="%s\n%s"]s  subgraph "cluster_%s" {s    label = "%s"s    "%s" [label="%s"]s  }s  "%s" -> "%s"t}N(tcollectionstdefaultdicttlisttitemsRtappendtprinttlen(RtfilesRtdstt
build_filettarget_namettoolsetRRRtdsts((sf/opt/alt/alt-nodejs8/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/tools/graphviz.pyt
WriteGraph-s.





cCs~ttj�dkrZttdtj�tdtj�tdtjddtj�dStdtjd�}t|�dS(NiRsusage: %s target1 target2...iis	dump.json(RtsystargvRt__doc__tstderrRR$(R((sf/opt/alt/alt-nodejs8/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/tools/graphviz.pytmainXs
t__main__(R't
__future__RRR
R%RRR$R)t__name__texit(((sf/opt/alt/alt-nodejs8/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/tools/graphviz.pyt<module>	s			+	


?>