|
|
Chromium Code Reviews|
Created:
6 years, 11 months ago by Peter Kasting Modified:
6 years, 11 months ago Reviewers:
M-A Ruel CC:
chromium-reviews Base URL:
svn://chrome-svn/chrome/trunk/src/ Visibility:
Public. |
DescriptionSwitch gyp_chromium from third_party/python_26, which is gone, to
depot_tools/python276_bin.
BUG=335180
TEST=gclient runhooks works again on Cygwin
R=maruel@chromium.org
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=245705
Patch Set 1 #
Total comments: 4
Patch Set 2 : #Messages
Total messages: 10 (0 generated)
https://codereview.chromium.org/141563007/diff/1/build/gyp_chromium File build/gyp_chromium (right): https://codereview.chromium.org/141563007/diff/1/build/gyp_chromium#newcode308 build/gyp_chromium:308: python_dir = os.path.join(depot_tools_path, 'python276_bin') The main issue is that it is not forward compatible. I'd prefer it to search imediate subdirectories for a python.exe.
https://codereview.chromium.org/141563007/diff/1/build/gyp_chromium File build/gyp_chromium (right): https://codereview.chromium.org/141563007/diff/1/build/gyp_chromium#newcode308 build/gyp_chromium:308: python_dir = os.path.join(depot_tools_path, 'python276_bin') On 2014/01/18 00:10:58, M-A Ruel wrote: > The main issue is that it is not forward compatible. I'd prefer it to search > imediate subdirectories for a python.exe. The problem here is that there's also a "python_bin" dir which contains a python.exe that is python 2.6. I would love to see that directory die, so that "python_bin" was the one and only python, but I don't know the history of this directory or why that hasn't been done already. Until then, I don't know how one would write the aforementioned search.
https://codereview.chromium.org/141563007/diff/1/build/gyp_chromium File build/gyp_chromium (right): https://codereview.chromium.org/141563007/diff/1/build/gyp_chromium#newcode308 build/gyp_chromium:308: python_dir = os.path.join(depot_tools_path, 'python276_bin') On 2014/01/18 00:13:23, Peter Kasting wrote: > On 2014/01/18 00:10:58, M-A Ruel wrote: > > The main issue is that it is not forward compatible. I'd prefer it to search > > imediate subdirectories for a python.exe. > > The problem here is that there's also a "python_bin" dir which contains a > python.exe that is python 2.6. > > I would love to see that directory die, so that "python_bin" was the one and > only python, but I don't know the history of this directory or why that hasn't > been done already. Until then, I don't know how one would write the > aforementioned search. python_exe = sorted(glob.glob(os.path.join(depot_tools_path, 'python2*_bin/python.exe')))[-1]
https://codereview.chromium.org/141563007/diff/1/build/gyp_chromium File build/gyp_chromium (right): https://codereview.chromium.org/141563007/diff/1/build/gyp_chromium#newcode308 build/gyp_chromium:308: python_dir = os.path.join(depot_tools_path, 'python276_bin') On 2014/01/18 00:16:40, M-A Ruel wrote: > On 2014/01/18 00:13:23, Peter Kasting wrote: > > On 2014/01/18 00:10:58, M-A Ruel wrote: > > > The main issue is that it is not forward compatible. I'd prefer it to search > > > imediate subdirectories for a python.exe. > > > > The problem here is that there's also a "python_bin" dir which contains a > > python.exe that is python 2.6. > > > > I would love to see that directory die, so that "python_bin" was the one and > > only python, but I don't know the history of this directory or why that hasn't > > been done already. Until then, I don't know how one would write the > > aforementioned search. > > python_exe = sorted(glob.glob(os.path.join(depot_tools_path, > 'python2*_bin/python.exe')))[-1] That's certainly a little better, but it still assumes python is in a "python2*" directory. Why can't we just kill python_bin and move python276_bin to that?
On 2014/01/18 00:20:27, Peter Kasting wrote: > > python_exe = sorted(glob.glob(os.path.join(depot_tools_path, > > 'python2*_bin/python.exe')))[-1] > > That's certainly a little better, but it still assumes python is in a "python2*" > directory. Why can't we just kill python_bin and move python276_bin to that? python_bin is only present in old installation. You can safely delete it after the upgrade. The auto-upgrade code cannot delete it because when the upgrade occurs, it doesn't know if a python process exists, so there's no way to know if the python_bin can be deleted. This is particularly true on the buildbot slaves. As long as the code is python 2.x, it's guaranteed to have the format python2xxx_bin. As long as the numbers are monotonically incrementing, it's fine.
On 2014/01/18 00:27:55, M-A Ruel wrote: > On 2014/01/18 00:20:27, Peter Kasting wrote: > > > python_exe = sorted(glob.glob(os.path.join(depot_tools_path, > > > 'python2*_bin/python.exe')))[-1] > > > > That's certainly a little better, but it still assumes python is in a > "python2*" > > directory. Why can't we just kill python_bin and move python276_bin to that? > > python_bin is only present in old installation. You can safely delete it after > the upgrade. The auto-upgrade code cannot delete it because when the upgrade > occurs, it doesn't know if a python process exists, so there's no way to know if > the python_bin can be deleted. This is particularly true on the buildbot slaves. > > As long as the code is python 2.x, it's guaranteed to have the format > python2xxx_bin. As long as the numbers are monotonically incrementing, it's > fine. This was documented in the faq in the announcement at https://groups.google.com/a/chromium.org/d/msg/chromium-dev/YhMhXaS0gHo/pdGqV...
Updated. I also uploaded https://codereview.chromium.org/141523009/ separately to ensure that Cygwin users actually have a relevant python directory in depot_tools/ to make use of.
lgtm
Message was sent while issue was closed.
Committed patchset #2 manually as r245705 (presubmit successful). |
