Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make root invocation less crazy so that multiprocessing works on Windows
Previously gyp.bat runs "python gyp" and "gyp" imports "gyp" expecting to get pylib/gyp/__init__.py. Multiprocessing tries to fork and doesn't find the entry point named gyp because it doesn't search for non-.py extensions. Instead, make non-Windows match with a wrapper 'gyp' in bash, and make the python entry point gyp_main.py so that importing works more normally. Also, remove "Using parallel processing..." message so that tests pass, otherwise they complain that there was output on stderr. This was failing on other OSs too. R=thakis@chromium.org BUG=154205 Review URL: https://codereview.chromium.org/18271010 git-svn-id: http://gyp.googlecode.com/svn/trunk@1667 78cadc50-ecff-11dd-a971-7dbc132099af
- Loading branch information
scottmg@chromium.org
committed
Jul 8, 2013
1 parent
423512d
commit 7ebf72a
Showing
4 changed files
with
26 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,7 @@ | ||
#!/usr/bin/env python | ||
|
||
# Copyright (c) 2009 Google Inc. All rights reserved. | ||
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
|
||
import sys | ||
|
||
# TODO(mark): sys.path manipulation is some temporary testing stuff. | ||
try: | ||
import gyp | ||
except ImportError, e: | ||
import os.path | ||
sys.path.append(os.path.join(os.path.dirname(sys.argv[0]), 'pylib')) | ||
import gyp | ||
|
||
if __name__ == '__main__': | ||
sys.exit(gyp.main(sys.argv[1:])) | ||
#!/usr/bin/bash | ||
# Copyright 2013 The Chromium Authors. All rights reserved. | ||
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
|
||
BASE=`dirname $0` | ||
python $BASE/gyp_main.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env python | ||
|
||
# Copyright (c) 2009 Google Inc. All rights reserved. | ||
# Use of this source code is governed by a BSD-style license that can be | ||
# found in the LICENSE file. | ||
|
||
import sys | ||
|
||
# TODO(mark): sys.path manipulation is some temporary testing stuff. | ||
try: | ||
import gyp | ||
except ImportError, e: | ||
import os.path | ||
sys.path.append(os.path.join(os.path.dirname(sys.argv[0]), 'pylib')) | ||
import gyp | ||
|
||
if __name__ == '__main__': | ||
sys.exit(gyp.main(sys.argv[1:])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters