|
|
Chromium Code Reviews
DescriptionAllow gen_file_type_proto.py to work in virtualenv.
There were complaints in crbug.com/605592 that virtualenv builds
are broken with the strategy of passing -w to gen_file_type_proto.py.
Systems can use virtualenv to isolate the Python environment from
dist-packages, making the nested call to this script redundant (and
broken, since -S breaks some assumptions from virtualenv).
BUG=605592
BUG=614082
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation
Committed: https://crrev.com/a0c75183f6dab0b8ab2953b34595d6fd5651b9bc
Cr-Commit-Position: refs/heads/master@{#428777}
Patch Set 1 #
Total comments: 4
Patch Set 2 : Added comments #Messages
Total messages: 30 (17 generated)
Description was changed from ========== Allow gen_file_type_proto.py to work in virtualenv. There were complaints in crbug.com/605592 that virtualenv builds are broken with the strategy of passing -w to gen_file_type_proto.py. Systems can use virtualenv to isolate the Python environment from dist-packages, making the nested call to this script redundant (and broken, since -S breaks some assumptions from virtualenv). BUG=605592 BUG=614082 ========== to ========== Allow gen_file_type_proto.py to work in virtualenv. There were complaints in crbug.com/605592 that virtualenv builds are broken with the strategy of passing -w to gen_file_type_proto.py. Systems can use virtualenv to isolate the Python environment from dist-packages, making the nested call to this script redundant (and broken, since -S breaks some assumptions from virtualenv). BUG=605592 BUG=614082 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation ==========
sanfin@chromium.org changed reviewers: + mbjorge@chromium.org, nparker@chromium.org, sanfin@chromium.org, slan@chromium.org, xyzzyz@chromium.org
Hi all, The Chromecast buildbots use a Python virtualenv to build our targets, which breaks when we have the -S flag passed to the Python interpreter, as in gen_file_type_proto.py. This change allows the script to function on virtualenv environments and non-virtual environments alike, without requiring us to have a local patch in internal Chromecast code to comment out the -w parameter in the gn target. PTAL
lgtm, but please be sure to run it on all trybots, as this kind of changes tend to break setups different than the one author tests it on (the "-s -S" change was originally introduced to work around an issue with gentoo, where this script attempted to use the protobuf library shipped with gentoo instead of chromium's one). https://codereview.chromium.org/2341173004/diff/1/chrome/browser/resources/sa... File chrome/browser/resources/safe_browsing/gen_file_type_proto.py (right): https://codereview.chromium.org/2341173004/diff/1/chrome/browser/resources/sa... chrome/browser/resources/safe_browsing/gen_file_type_proto.py:22: return hasattr(sys, 'real_prefix') Is it an official way of detecting being run inside a virtualenv?
https://codereview.chromium.org/2341173004/diff/1/chrome/browser/resources/sa... File chrome/browser/resources/safe_browsing/gen_file_type_proto.py (right): https://codereview.chromium.org/2341173004/diff/1/chrome/browser/resources/sa... chrome/browser/resources/safe_browsing/gen_file_type_proto.py:22: return hasattr(sys, 'real_prefix') On 2016/09/19 at 14:02:14, xyzzyz wrote: > Is it an official way of detecting being run inside a virtualenv? It's not official; pip uses this method also though, so that may give it some credence: https://github.com/pypa/pip/blob/281eb61b09d87765d7c2b92f6982b3fe76ccb0af/pip...
https://codereview.chromium.org/2341173004/diff/1/chrome/browser/resources/sa... File chrome/browser/resources/safe_browsing/gen_file_type_proto.py (right): https://codereview.chromium.org/2341173004/diff/1/chrome/browser/resources/sa... chrome/browser/resources/safe_browsing/gen_file_type_proto.py:21: def IsInVirtualEnv(): Add some comments describing why this is here, or what environment actually triggers it. Looks like the assumption is that if IsInVirtualEnv(), then the paths for proto modules are already correct.
The CQ bit was checked by sanfin@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: No L-G-T-M from a valid reviewer yet. CQ run can only be started by full committers or once the patch has received an L-G-T-M from a full committer. Even if an L-G-T-M may have been provided, it was from a non-committer, _not_ a full super star committer. See http://www.chromium.org/getting-involved/become-a-committer Note that this has nothing to do with OWNERS files.
https://codereview.chromium.org/2341173004/diff/1/chrome/browser/resources/sa... File chrome/browser/resources/safe_browsing/gen_file_type_proto.py (right): https://codereview.chromium.org/2341173004/diff/1/chrome/browser/resources/sa... chrome/browser/resources/safe_browsing/gen_file_type_proto.py:21: def IsInVirtualEnv(): On 2016/09/19 16:46:23, Nathan Parker wrote: > Add some comments describing why this is here, or what environment actually > triggers it. > > Looks like the assumption is that if IsInVirtualEnv(), then the paths for proto > modules are already correct. Done.
The CQ bit was checked by sanfin@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: No L-G-T-M from a valid reviewer yet. CQ run can only be started by full committers or once the patch has received an L-G-T-M from a full committer. Even if an L-G-T-M may have been provided, it was from a non-committer, _not_ a full super star committer. See http://www.chromium.org/getting-involved/become-a-committer Note that this has nothing to do with OWNERS files.
lgtm
The CQ bit was checked by sanfin@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from xyzzyz@chromium.org Link to the patchset: https://codereview.chromium.org/2341173004/#ps20001 (title: "Added comments")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: cast_shell_linux on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linu...)
The CQ bit was checked by sanfin@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_chromium_compile_dbg_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by sanfin@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Committed patchset #2 (id:20001)
Message was sent while issue was closed.
Description was changed from ========== Allow gen_file_type_proto.py to work in virtualenv. There were complaints in crbug.com/605592 that virtualenv builds are broken with the strategy of passing -w to gen_file_type_proto.py. Systems can use virtualenv to isolate the Python environment from dist-packages, making the nested call to this script redundant (and broken, since -S breaks some assumptions from virtualenv). BUG=605592 BUG=614082 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation ========== to ========== Allow gen_file_type_proto.py to work in virtualenv. There were complaints in crbug.com/605592 that virtualenv builds are broken with the strategy of passing -w to gen_file_type_proto.py. Systems can use virtualenv to isolate the Python environment from dist-packages, making the nested call to this script redundant (and broken, since -S breaks some assumptions from virtualenv). BUG=605592 BUG=614082 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Committed: https://crrev.com/a0c75183f6dab0b8ab2953b34595d6fd5651b9bc Cr-Commit-Position: refs/heads/master@{#428777} ==========
Message was sent while issue was closed.
Patchset 2 (id:??) landed as https://crrev.com/a0c75183f6dab0b8ab2953b34595d6fd5651b9bc Cr-Commit-Position: refs/heads/master@{#428777} |
