-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mostly reverts hedronvision/bazel-compile-commands-extractor@59dc7ff Tracking restoration at hedronvision/bazel-compile-commands-extractor#168 Please see - hedronvision/bazel-compile-commands-extractor#163 - bazelbuild/rules_python#1732 - hedronvision/bazel-compile-commands-extractor#165 - (rules_python issue to come) - hedronvision/bazel-compile-commands-extractor#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.