Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(977)

Side by Side Diff: tools/swig/swig.py

Issue 8678023: Fix python scripts in src/tools/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/sort-headers.py ('k') | tools/symsrc/img_fingerprint.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/env python
2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Wrapper around swig. 6 """Wrapper around swig.
7 7
8 Sets the SWIG_LIB environment var to point to Lib dir 8 Sets the SWIG_LIB environment var to point to Lib dir
9 and defers control to the platform-specific swig binary. 9 and defers control to the platform-specific swig binary.
10 10
11 Depends on swig binaries being available at ../../third_party/swig. 11 Depends on swig binaries being available at ../../third_party/swig.
(...skipping 20 matching lines...) Expand all
32 platform_flags = { 32 platform_flags = {
33 'darwin': '-DSWIGMAC', 33 'darwin': '-DSWIGMAC',
34 'linux2': '-DSWIGLINUX', 34 'linux2': '-DSWIGLINUX',
35 'linux3': '-DSWIGLINUX', 35 'linux3': '-DSWIGLINUX',
36 'win32': '-DSWIGWIN', 36 'win32': '-DSWIGWIN',
37 } 37 }
38 swig_bin = os.path.join(swig_dir, dir_map[sys.platform], 'swig') 38 swig_bin = os.path.join(swig_dir, dir_map[sys.platform], 'swig')
39 args = [swig_bin, platform_flags[sys.platform]] + sys.argv[1:] 39 args = [swig_bin, platform_flags[sys.platform]] + sys.argv[1:]
40 args = [x.replace('/', os.sep) for x in args] 40 args = [x.replace('/', os.sep) for x in args]
41 print "Executing", args 41 print "Executing", args
42 sys.exit(subprocess.call(args)) 42 return subprocess.call(args)
43 43
44 44
45 if __name__ == "__main__": 45 if __name__ == "__main__":
46 main() 46 sys.exit(main())
47
OLDNEW
« no previous file with comments | « tools/sort-headers.py ('k') | tools/symsrc/img_fingerprint.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698