OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 | 2 |
3 # Copyright (c) 2009 Google Inc. All rights reserved. | 3 # Copyright (c) 2009 Google Inc. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
| 7 import os |
7 import sys | 8 import sys |
8 | 9 |
9 # TODO(mark): sys.path manipulation is some temporary testing stuff. | 10 # Make sure we're using the version of pylib in this repo, not one installed |
10 try: | 11 # elsewhere on the system. |
11 import gyp | 12 sys.path.insert(0, os.path.join(os.path.dirname(sys.argv[0]), 'pylib')) |
12 except ImportError, e: | 13 import gyp |
13 import os.path | |
14 sys.path.append(os.path.join(os.path.dirname(sys.argv[0]), 'pylib')) | |
15 import gyp | |
16 | 14 |
17 if __name__ == '__main__': | 15 if __name__ == '__main__': |
18 sys.exit(gyp.script_main()) | 16 sys.exit(gyp.script_main()) |
OLD | NEW |