OLD | NEW |
---|---|
(Empty) | |
1 #!/usr/bin/env python | |
2 # Copyright 2016 The Chromium Authors. All rights reserved. | |
3 # Use of this source code is governed by a BSD-style license that can be | |
4 # found in the LICENSE file. | |
5 | |
6 import os | |
Dan Beam
2017/01/20 01:03:07
nit: from os import path as os_path
dpapad
2017/01/20 01:51:50
Done.
| |
7 import platform | |
8 | |
Dan Beam
2017/01/20 01:03:07
\n\n between file-level globals
dpapad
2017/01/20 01:51:50
Done.
| |
9 _THIRD_PARTY_NODE_DIR = os.path.join(os.path.dirname(__file__)) | |
10 | |
11 # Gets the path to the Node binary based on current platform. | |
12 def get_binary(): | |
13 third_party_node_binary = ''; | |
14 | |
15 if platform.system() == 'Darwin': | |
16 third_party_node_binary = os.path.join( | |
17 'mac', 'node-darwin-x64', 'bin', 'node') | |
18 elif platform.system() == 'Linux': | |
19 third_party_node_binary = os.path.join( | |
20 'linux', 'node-linux-x64', 'bin', 'node') | |
21 elif platform.system() == 'Windows': | |
22 third_party_node_binary = os.path.join('win', 'node.exe') | |
23 | |
24 return os.path.abspath(os.path.join( | |
25 _THIRD_PARTY_NODE_DIR, third_party_node_binary)) | |
26 | |
27 if __name__ == '__main__': | |
28 pass | |
Dan Beam
2017/01/20 01:03:07
what's the point of this? could we remove it or m
dpapad
2017/01/20 01:51:50
Removed. I'll defer adding a main until it is need
| |
OLD | NEW |