Chromium Code Reviews| Index: third_party/node/node.py |
| diff --git a/third_party/node/node.py b/third_party/node/node.py |
| new file mode 100755 |
| index 0000000000000000000000000000000000000000..00a1e4968a208210df427088b002dab921f73c2a |
| --- /dev/null |
| +++ b/third_party/node/node.py |
| @@ -0,0 +1,19 @@ |
| +#!/usr/bin/env python |
| +# Copyright 2017 The Chromium Authors. All rights reserved. |
| +# Use of this source code is governed by a BSD-style license that can be |
| +# found in the LICENSE file. |
| + |
| +from os import path as os_path |
| + |
| + |
| +def GetPlatformPath(): |
|
dpapad
2017/01/20 17:45:55
Does this need to be public? Only GetBinaryPath()
Dan Beam
2017/01/20 18:02:41
Done.
|
| + import platform |
| + return os_path.join(*{ |
| + 'Darwin': ('mac', 'node-darwin-x64', 'bin', 'node'), |
| + 'Linux': ('linux', 'node-linux-x64', 'bin', 'node'), |
| + 'Windows': ('win', 'node.exe'), |
| + }[platform.system()]) |
|
dpapad
2017/01/20 17:45:55
Don't you need to import this before using it?
Dan Beam
2017/01/20 18:02:41
L10
|
| + |
| + |
| +def GetBinaryPath(): |
| + return os_path.join(os_path.dirname(__file__), GetPlatformPath()) |