관리-도구
편집 파일: graphviz.pyc
� �Rac @ sq d Z d d l Z d d l Z d d l Z d � Z d � Z d � Z d � Z e d k rm e j e � � n d S( s� Using the JSON dumped by the dump-dependency-json generator, generate input suitable for graphviz to render a dependency graph of targets.i����Nc C s= | j d � \ } } } | j d � \ } } } | | | f S( Nt #t :( t partition( t targett _t suffixt filename( ( sf /opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/tools/graphviz.pyt ParseTarget s c C s� t d � } t j | � } | j � i } | } xG | r{ | j � } | | k rY q5 n | | | | <| j | | � q5 W| S( sp Load the edges map from the dump file, and filter it to only show targets in |targets| and their depedendents.s dump.json( t opent jsont loadt closet popt extend( R t targetst filet edgest target_edgest to_visitt src( ( sf /opt/alt/alt-nodejs6/root/usr/lib/node_modules/npm/node_modules.bundled/node-gyp/gyp/tools/graphviz.pyt LoadEdges s c C sV t j t � } x@ | j � D]2 \ } } t | � \ } } } | | j | � q Wd GHd GHd GHx� | j � D]� \ } } t | � d k r� | d } t | � \ } } } d | | | f GHqn d | GHd | GHx2 | D]* } t | � \ } } } d | | f GHq� Wd GHqn Wx: | j � D], \ } } x | D] } d | | f GHq0WqWd GHd S( sh Print a graphviz graph to stdout. |edges| is a map of target to a list of other targets it depends on.s digraph D {s fontsize=8s node [fontsize=8]i i s"