feat: support backends requirements#19406
Merged
kaos merged 11 commits intopantsbuild:mainfrom Jul 5, 2023
Merged
Conversation
added 3 commits
July 4, 2023 14:19
Before this change, the only way backends could use external dependencies is by adding them to the [GLOBAL].plugins section. This change allow backends to declare their dependencies in a requirements.txt file, next to their register.py module, and those will be loaded before the backends, together with the global plugins.
Co-authored-by: Andreas Stenius <git@astekk.se>
Co-authored-by: Andreas Stenius <git@astekk.se>
kaos
approved these changes
Jul 4, 2023
Member
kaos
left a comment
There was a problem hiding this comment.
Huzzah!
I'm really excited about this change, and very well executed, thank you :)
Member
|
Come to think of it, would also be great to mention this in the docs, perhaps around here: https://www.pantsbuild.org/docs/plugins-overview#building-in-repo-plugins-with-pants pants/docs/markdown/Writing Plugins/plugins-overview.md Lines 114 to 116 in 062ec62 |
Contributor
Author
|
Thanks! updated the docs :) |
added 2 commits
July 5, 2023 10:57
Contributor
Author
Member
Contributor
|
Thanks @idan-at, this is great! |
idan-at
added a commit
to idan-at/pants
that referenced
this pull request
Dec 31, 2023
This fixed the change that was introduced on pantsbuild#19406: Due to the fact sys.path was not yet altered, `_collect_backends_requirements` fails to load in-repo plugins, thus ignoring the requirements.txt file.
idan-at
added a commit
to idan-at/pants
that referenced
this pull request
Jan 8, 2024
This fixed the change that was introduced on pantsbuild#19406: Due to the fact sys.path was not yet altered, `_collect_backends_requirements` fails to load in-repo plugins, thus ignoring the requirements.txt file.
kaos
pushed a commit
that referenced
this pull request
Jan 9, 2024
This fixes the change that was introduced on #19406: Due to the fact sys.path was not yet altered, `_collect_backends_requirements` fails to load in-repo plugins, thus ignoring the requirements.txt file. --------- Co-authored-by: Idan Attias <idanat@google.com>
WorkerPants
pushed a commit
that referenced
this pull request
Jan 9, 2024
This fixes the change that was introduced on #19406: Due to the fact sys.path was not yet altered, `_collect_backends_requirements` fails to load in-repo plugins, thus ignoring the requirements.txt file. --------- Co-authored-by: Idan Attias <idanat@google.com>
kaos
pushed a commit
that referenced
this pull request
Jan 29, 2024
…) (#20381) This fixes the change that was introduced on #19406: Due to the fact sys.path was not yet altered, `_collect_backends_requirements` fails to load in-repo plugins, thus ignoring the requirements.txt file. Co-authored-by: Idan Attias <idanzii@gmail.com> Co-authored-by: Idan Attias <idanat@google.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #19183
Before this change, the only way backends could use external dependencies is
by adding them to the [GLOBAL].plugins section.
This change allow backends to declare their dependencies in a
requirements.txt file, next to their register.py module, and those
will be loaded before the backends, together with the global plugins.