Your IP : 18.119.116.77


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

�
�Rac@sqdZddlZddlZddlZd�Zd�Zd�Zd�Zedkrmej	e��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����NcCs=|jd�\}}}|jd�\}}}|||fS(Nt#t:(t	partition(ttargett_tsuffixtfilename((sf/opt/alt/alt-nodejs6/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-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/tools/graphviz.pyt	LoadEdgess
	cCsVtjt�}x@|j�D]2\}}t|�\}}}||j|�qWdGHdGHdGHx�|j�D]�\}}t|�dkr�|d}	t|	�\}}}d|	||fGHqnd|GHd|GHx2|D]*}	t|	�\}}}d	|	|fGHq�Wd
GHqnWx:|j�D],\}}
x|
D]}d||fGHq0WqWdGHd
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(tcollectionstdefaultdicttlisttitemsRtappendtlen(RtfilesRtdstt
build_filettarget_namettoolsetRRRtdsts((sf/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/tools/graphviz.pyt
WriteGraph+s.
			
	
cCsittj�dkrEtjtIJtjJtjdtjdIJdStdtjd�}t|�dS(Nisusage: %s target1 target2...iis	dump.json(Rtsystargvtstderrt__doc__RR"(R((sf/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/tools/graphviz.pytmainVs

t__main__(
R&RR	R#RRR"R't__name__texit(((sf/opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/tools/graphviz.pyt<module>	s			+	


?>