wutingcindy / gyp

Automatically exported from code.google.com/p/gyp
0 stars 0 forks source link

GYP should provide a PYTHON default_variable #322

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
In the context of https://bugzilla.mozilla.org/show_bug.cgi?id=814333, in 
mozilla's webrtc code 'python' is used to run commands and set variables in 
various .gypi files. On some platforms (like OpenBSD) 'python' doesnt exist in 
the path, only python2.7 or python3.2 for example.

Mozilla build system allows one to set PYTHON environment variable pointing to 
the desired python binary, and it is used to run gyp from configure - but gyp 
doesn't provide a method to _reuse_ that binary.

A possibility to work around this is to add PYTHON to default_variables[] in 
pylib/gyp/__init__.py, defaulting it to sys.executable. This way, one can reuse 
<(PYTHON) in the .gypi files. See 
https://bug814333.bugzilla.mozilla.org/attachment.cgi?id=715989 for the full 
patch - and see the attached patch for an svn diff against gyp trunk.

Original issue reported on code.google.com by landry.b...@gmail.com on 20 Feb 2013 at 8:52

Attachments:

GoogleCodeExporter commented 9 years ago
I think you'll want to submit this patch at https://codereview.chromium.org/ 
and ask for review from mark@chromium.org.

Original comment by ted.mielczarek on 21 Feb 2013 at 1:40

GoogleCodeExporter commented 9 years ago
Being reviewed/debated at https://codereview.chromium.org/12374093 (i dont have 
a codereview account, and dont plan to create one with the google CLA)

Original comment by landry.b...@gmail.com on 4 Mar 2013 at 9:35