Document how to vendor a pip_parse requirements.bzl file#655
Conversation
6647c6f to
146c8d1
Compare
|
|
||
|
|
||
| def main() -> None: | ||
| def main(output) -> None: |
There was a problem hiding this comment.
nit: Can you type annotate output? Perhaps even add a docstring?
hrfuller
left a comment
There was a problem hiding this comment.
Thanks! LGTM modulo comments.
| actual = entry_point("flake8"), | ||
| ) | ||
|
|
||
| ## Vendoring the requirements.bzl file |
There was a problem hiding this comment.
This commentary is place in the middle of a Starlark codeblock. The gen'd .md has syntax highlighting on it.
I think the above codeblock just needs to be closed before starting this commentary. It's currently closed at https://github.com/bazelbuild/rules_python/pull/655/files#diff-b92f94a67df862cde9714ff224afa676e39fe02da4fd4c6993daf684fbbc7cbdR194
7495615 to
8f1876f
Compare
8f1876f to
f5be3ab
Compare
| # Under `bazel run`, just print the generated starlark code. | ||
| # This allows users to check that into their repository rather than | ||
| # call pip_parse to generate as a repository rule. | ||
| if "BUILD_WORKING_DIRECTORY" in os.environ: |
There was a problem hiding this comment.
This caused a regression where I can no longer bazel run targets that then call Bazel on the workspace. This should always write a requirements.bzl file.
fixes #608