|
|
Created:
7 years, 9 months ago by qbit Modified:
7 years, 9 months ago CC:
gyp-developer_googlegroups.com, Mark Mentovai Base URL:
http://gyp.googlecode.com/svn/trunk Visibility:
Public. |
Descriptionpass back python bin from configure
BUG=gyp:322
Patch Set 1 #
Total comments: 3
Messages
Total messages: 12 (0 generated)
Hi Mark, Can you review? Cheers, Aaron
https://codereview.chromium.org/12374093/diff/1/pylib/gyp/__init__.py File pylib/gyp/__init__.py (right): https://codereview.chromium.org/12374093/diff/1/pylib/gyp/__init__.py#newcode74 pylib/gyp/__init__.py:74: default_variables['PYTHON'] = sys.executable default_variables isn’t right. Which commands are you interested in having PYTHON set for? Various ones that might run from within GYP? You’ll want to set PYTHON in the environment. Commands that might be invoked during a build (post-GYP)? There’s no guarantee that anything in default_variables gets exported to the environment. I don’t think this function is the right spot for this, either. If you’re going to alter the environment, you probably want to use gyp_main, not Load.
On 2013/03/04 21:24:53, Mark Mentovai wrote: > https://codereview.chromium.org/12374093/diff/1/pylib/gyp/__init__.py > File pylib/gyp/__init__.py (right): > > https://codereview.chromium.org/12374093/diff/1/pylib/gyp/__init__.py#newcode74 > pylib/gyp/__init__.py:74: default_variables['PYTHON'] = sys.executable > default_variables isn’t right. Which commands are you interested in having > PYTHON set for? Various ones that might run from within GYP? You’ll want to set > PYTHON in the environment. Commands that might be invoked during a build > (post-GYP)? There’s no guarantee that anything in default_variables gets > exported to the environment. > > I don’t think this function is the right spot for this, either. If you’re going > to alter the environment, you probably want to use gyp_main, not Load. More background info here: https://code.google.com/p/gyp/issues/detail?id=322
If you won’t sign the CLA, we can’t accept your patch. Sorry, them’s the breaks.
On 2013/03/04 21:45:44, Mark Mentovai wrote: > If you won’t sign the CLA, we can’t accept your patch. Sorry, them’s the breaks. I never said I wouldn't sign a CLA :P - that was landry.
Excellent. When you update this patch, can you review and sign the CLA if you agree to it too? https://developers.google.com/open-source/cla/individual, or if you’re working for a company and not yourself, https://developers.google.com/open-source/cla/corporate.
On 2013/03/04 22:04:02, Mark Mentovai wrote: > Excellent. When you update this patch, can you review and sign the CLA if you > agree to it too? https://developers.google.com/open-source/cla/individual, or if > you’re working for a company and not yourself, > https://developers.google.com/open-source/cla/corporate. Signed.
CLA signed.
Great. Now we just need a revised patch based on my previous comments.
https://codereview.chromium.org/12374093/diff/1/pylib/gyp/__init__.py File pylib/gyp/__init__.py (right): https://codereview.chromium.org/12374093/diff/1/pylib/gyp/__init__.py#newcode74 pylib/gyp/__init__.py:74: default_variables['PYTHON'] = sys.executable (I glanced at the Mozilla patch that prompted this) They are writing their action commands lines like (sorry for forgetting gyp syntax): "<(PYTHON) foo.py <(INPUTS)" which is why the above works for them.
https://codereview.chromium.org/12374093/diff/1/pylib/gyp/__init__.py File pylib/gyp/__init__.py (right): https://codereview.chromium.org/12374093/diff/1/pylib/gyp/__init__.py#newcode74 pylib/gyp/__init__.py:74: default_variables['PYTHON'] = sys.executable Is it possible to use <!@pymod_do_main(foo <@(INPUTS)) to execute code from foo.py without spawning a new python process? See https://code.google.com/p/gyp/source/detail?r=924
On 2013/03/05 17:05:49, Evan Martin wrote: > https://codereview.chromium.org/12374093/diff/1/pylib/gyp/__init__.py > File pylib/gyp/__init__.py (right): > > https://codereview.chromium.org/12374093/diff/1/pylib/gyp/__init__.py#newcode74 > pylib/gyp/__init__.py:74: default_variables['PYTHON'] = sys.executable > (I glanced at the Mozilla patch that prompted this) > > They are writing their action commands lines like (sorry for forgetting gyp > syntax): > "<(PYTHON) foo.py <(INPUTS)" > which is why the above works for them. FWIW, all the gyp files we use in Mozilla come from upstream Google projects. The one that prompted this bug was from WebRTC. |