OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 | 2 |
3 # Copyright (c) 2012 Google Inc. All rights reserved. | 3 # Copyright (c) 2012 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 copy | 7 import copy |
8 import gyp.input | 8 import gyp.input |
9 import optparse | 9 import optparse |
10 import os.path | 10 import os.path |
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
535 return 0 | 535 return 0 |
536 | 536 |
537 | 537 |
538 def main(args): | 538 def main(args): |
539 try: | 539 try: |
540 return gyp_main(args) | 540 return gyp_main(args) |
541 except GypError, e: | 541 except GypError, e: |
542 sys.stderr.write("gyp: %s\n" % e) | 542 sys.stderr.write("gyp: %s\n" % e) |
543 return 1 | 543 return 1 |
544 | 544 |
| 545 # NOTE: setuptools generated console_scripts calls function with no arguments |
| 546 def script_main(): |
| 547 return main(sys.argv[1:]) |
| 548 |
545 if __name__ == '__main__': | 549 if __name__ == '__main__': |
546 sys.exit(main(sys.argv[1:])) | 550 sys.exit(script_main()) |
OLD | NEW |