-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mostly reverts 0e5b1aa Tracking restoration at #168 Please see - #163 - bazelbuild/rules_python#1732 - #165 - (rules_python issue to come) - #166 - bazelbuild/rules_python#1169
- Loading branch information
Showing
11 changed files
with
143 additions
and
103 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
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
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,15 @@ | ||
""" | ||
Print a nice error message if the user is running too old of a version of python. | ||
Why not just put this block at the top of refresh.template.py? | ||
Python versions introduce constructs that don't parse in older versions, leading to an error before the version check is executed, since python parses files eagerly. | ||
For examples of this issue, see https://github.com/hedronvision/bazel-compile-commands-extractor/issues/119 and https://github.com/hedronvision/bazel-compile-commands-extractor/issues/95 | ||
This seems common enough that hopefully bazel will support it someday. We've filed a request: https://github.com/bazelbuild/bazel/issues/18389 | ||
""" | ||
|
||
import sys | ||
if sys.version_info < (3,6): | ||
sys.exit("\n\033[31mFATAL ERROR:\033[0m Python 3.6 or later is required. Please update!") | ||
|
||
# Only import -> parse once we're sure we have the required python version | ||
import {to_run} | ||
{to_run}.main() |
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
Oops, something went wrong.