Skip to content

feat: allow setting custom environment variables on pip_repository and whl_library#460

Merged
hrfuller merged 8 commits intobazel-contrib:mainfrom
mattem:feat/environment_attr
Jul 30, 2021
Merged

feat: allow setting custom environment variables on pip_repository and whl_library#460
hrfuller merged 8 commits intobazel-contrib:mainfrom
mattem:feat/environment_attr

Conversation

@mattem
Copy link
Contributor

@mattem mattem commented Apr 19, 2021

Allows specifying custom environment variables on the pip_repository and whl_library repository rules that are set when run.

Edit: @hrfuller Also incidentally fixes #490

@mattem mattem requested review from brandjon and lberki as code owners April 19, 2021 16:00
@google-cla google-cla bot added the cla: yes label Apr 19, 2021
@mattem mattem force-pushed the feat/environment_attr branch from 1c5b79a to 37ca320 Compare April 19, 2021 16:32
@mattem
Copy link
Contributor Author

mattem commented Apr 19, 2021

cc @alexeagle 🌮

@mattem mattem force-pushed the feat/environment_attr branch from 37ca320 to 40f1a9c Compare April 20, 2021 13:38
@mattem mattem requested a review from alexeagle April 22, 2021 14:45
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.

In order for this to work with pip_parse the rctx.attr.environment needs to be serialized,see _parse_optional_attrs, and passed into the parse_requirements_to_bzl script via a command line arg. It should then be deserialized and written to the requirements.bzl file that is produced by that script. That will make all the whl_library sub-repos that depend on a pip_parse repo use the environment.

Jonathon Belotti and others added 3 commits June 9, 2021 09:57
of starlark.

* Refactor shared functions between extract_wheel and extract_single_wheel.
* Every structured arg now has the same level key when serialized. fixes bazel-contrib#490
* test for pip_data_exclude in arguments parsing test.
@google-cla
Copy link

google-cla bot commented Jul 25, 2021

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added cla: no and removed cla: yes labels Jul 25, 2021
@hrfuller hrfuller added cla: yes and removed cla: no labels Jul 25, 2021
@google-cla google-cla bot removed the cla: yes label Jul 25, 2021
@google-cla
Copy link

google-cla bot commented Jul 25, 2021

☹️ Sorry, but only Googlers may change the label cla: yes.

@hrfuller
Copy link
Contributor

@googlebot I consent.

@google-cla google-cla bot added the cla: yes label Jul 25, 2021
@hrfuller hrfuller self-requested a review July 25, 2021 21:32
@hrfuller hrfuller requested review from thundergolfer and removed request for brandjon and lberki July 25, 2021 21:32
@mattem mattem requested a review from andyscott as a code owner July 25, 2021 23:25
@hrfuller
Copy link
Contributor

Hey @mattem I have tested this using an HTTPS_PROXY env var in the pip_parse example, and it works. Would you like to wait for review from @andyscott / @alexeagle before I merge?

@mattem
Copy link
Contributor Author

mattem commented Jul 29, 2021

Thanks for pushing this over the line @hrfuller! I think this is okay, I'm happy for it to be merged though.

@hrfuller hrfuller merged commit 304b85c into bazel-contrib:main Jul 30, 2021
@mattem mattem deleted the feat/environment_attr branch January 31, 2023 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Using pip_data_exclude leads to errors

3 participants