Skip to content

how to generate requirements.txt from BUILD file? #19035

Answered by benjyw
jessehersch asked this question in Q&A
Discussion options

You must be logged in to vote

Interesting question. Typically there is already a requirements.txt from which the targets are generated. But it sounds like you have manual python_requirement targets or something like that?

Anyway, in v2 you can do something like:

./pants peek 3rdparty/python/:: | jq -r ".[].requirements | select( . != null ) | flatten[]"

Replies: 2 comments 2 replies

Comment options

benjyw
May 18, 2023
Maintainer Sponsor

You must be logged in to vote
2 replies
@jessehersch
Comment options

@benjyw
Comment options

benjyw Jun 2, 2023
Maintainer Sponsor

Answer selected by jessehersch
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants