Skip to content

Fetching tool requirements from a requirements file #17351

Answered by thejcannon
AbdealiLoKo asked this question in Q&A
Discussion options

You must be logged in to vote

So Pants uses pex to make lockfiles, so you should be able to lock like Pants does, and tell Pants to ignore the missing metadata.

  • Tell Pants to ignore missing metadata (unfortunately global): Set [python].invalid_lockfile_behavior = "ignore"
  • If you plan on just doing it yourself, you can install pex on your machine. Otherwise you'll need to sandbox pex in a pex_binary (which is a much longer explanation I plan on blogging about later). Note that #17336 would solve this in a very convenient way.
    • One caveat is to make sure you're using the version of pex equal or lower than Pants is, or else you might use newer metadata than Pants' PEX knows how to use. https://www.pantsbuild.org/docs/re…

Replies: 1 comment

Comment options

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