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

Unified Diff: tools/swig/swig.py

Issue 661342: Build pyauto on win (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: using subprocess.call() Created 10 years, 9 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/swig/README.chromium ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/swig/swig.py
===================================================================
--- tools/swig/swig.py (revision 40643)
+++ tools/swig/swig.py (working copy)
@@ -13,6 +13,7 @@
"""
import os
+import subprocess
import sys
@@ -25,10 +26,19 @@
'darwin': 'mac',
'linux2': 'linux',
'win32': 'win',
- 'cygwin': 'win',
}
+ # Swig documentation lies that platform macros are provided to swig
+ # preprocessor. Provide them ourselves.
+ platform_flags = {
+ 'darwin': '-DSWIGMAC',
+ 'linux2': '-DSWIGLINUX',
+ 'win32': '-DSWIGWIN',
+ }
swig_bin = os.path.join(swig_dir, dir_map[sys.platform], 'swig')
- os.execv(swig_bin, [swig_bin] + sys.argv[1:])
+ args = [swig_bin, platform_flags[sys.platform]] + sys.argv[1:]
+ args = [x.replace('/', os.sep) for x in args]
+ print "Executing", args
+ sys.exit(subprocess.call(args))
if __name__ == "__main__":
« no previous file with comments | « third_party/swig/README.chromium ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698