Skip to content

Document how to vendor a pip_parse requirements.bzl file#655

Merged
alexeagle merged 3 commits intomainfrom
pip_parse_checkin
Mar 16, 2022
Merged

Document how to vendor a pip_parse requirements.bzl file#655
alexeagle merged 3 commits intomainfrom
pip_parse_checkin

Conversation

@alexeagle
Copy link
Contributor

fixes #608



def main() -> None:
def main(output) -> None:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Can you type annotate output? Perhaps even add a docstring?

Copy link
Contributor

@hrfuller hrfuller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! LGTM modulo comments.

actual = entry_point("flake8"),
)

## Vendoring the requirements.bzl file

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops! thanks

@alexeagle alexeagle merged commit 1b59002 into main Mar 16, 2022
@alexeagle alexeagle deleted the pip_parse_checkin branch March 16, 2022 04:14
# 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:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pip_parse is burdensome for downstream projects

4 participants