aboutsummaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/node-gyp/gyp/tools/graphviz.py
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2019-07-24 23:00:03 -0700
committerMichaƫl Zasso <targos@protonmail.com>2019-08-06 09:05:32 +0200
commitd7d321b071789f08c65dbb11a0e4b3b6a299af44 (patch)
tree1015b8c5da3632fc986b56051a4853ac946c56f4 /deps/npm/node_modules/node-gyp/gyp/tools/graphviz.py
parent37d27486fce50bd82b6b5095af880d435ed308f8 (diff)
downloadandroid-node-v8-d7d321b071789f08c65dbb11a0e4b3b6a299af44.tar.gz
android-node-v8-d7d321b071789f08c65dbb11a0e4b3b6a299af44.tar.bz2
android-node-v8-d7d321b071789f08c65dbb11a0e4b3b6a299af44.zip
deps: upgrade npm to 6.10.2
PR-URL: https://github.com/nodejs/node/pull/28853 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Diffstat (limited to 'deps/npm/node_modules/node-gyp/gyp/tools/graphviz.py')
-rwxr-xr-xdeps/npm/node_modules/node-gyp/gyp/tools/graphviz.py30
1 files changed, 16 insertions, 14 deletions
diff --git a/deps/npm/node_modules/node-gyp/gyp/tools/graphviz.py b/deps/npm/node_modules/node-gyp/gyp/tools/graphviz.py
index 326ae221cf..538b059da4 100755
--- a/deps/npm/node_modules/node-gyp/gyp/tools/graphviz.py
+++ b/deps/npm/node_modules/node-gyp/gyp/tools/graphviz.py
@@ -8,6 +8,8 @@
generate input suitable for graphviz to render a dependency graph of
targets."""
+from __future__ import print_function
+
import collections
import json
import sys
@@ -50,9 +52,9 @@ def WriteGraph(edges):
build_file, target_name, toolset = ParseTarget(src)
files[build_file].append(src)
- print 'digraph D {'
- print ' fontsize=8' # Used by subgraphs.
- print ' node [fontsize=8]'
+ print('digraph D {')
+ print(' fontsize=8') # Used by subgraphs.
+ print(' node [fontsize=8]')
# Output nodes by file. We must first write out each node within
# its file grouping before writing out any edges that may refer
@@ -63,31 +65,31 @@ def WriteGraph(edges):
# the display by making it a box without an internal node.
target = targets[0]
build_file, target_name, toolset = ParseTarget(target)
- print ' "%s" [shape=box, label="%s\\n%s"]' % (target, filename,
- target_name)
+ print(' "%s" [shape=box, label="%s\\n%s"]' % (target, filename,
+ target_name))
else:
# Group multiple nodes together in a subgraph.
- print ' subgraph "cluster_%s" {' % filename
- print ' label = "%s"' % filename
+ print(' subgraph "cluster_%s" {' % filename)
+ print(' label = "%s"' % filename)
for target in targets:
build_file, target_name, toolset = ParseTarget(target)
- print ' "%s" [label="%s"]' % (target, target_name)
- print ' }'
+ print(' "%s" [label="%s"]' % (target, target_name))
+ print(' }')
# Now that we've placed all the nodes within subgraphs, output all
# the edges between nodes.
for src, dsts in edges.items():
for dst in dsts:
- print ' "%s" -> "%s"' % (src, dst)
+ print(' "%s" -> "%s"' % (src, dst))
- print '}'
+ print('}')
def main():
if len(sys.argv) < 2:
- print >>sys.stderr, __doc__
- print >>sys.stderr
- print >>sys.stderr, 'usage: %s target1 target2...' % (sys.argv[0])
+ print(__doc__, file=sys.stderr)
+ print(file=sys.stderr)
+ print('usage: %s target1 target2...' % (sys.argv[0]), file=sys.stderr)
return 1
edges = LoadEdges('dump.json', sys.argv[1:])