quaint-telephone-89068
10/27/2022, 7:54 AMpex
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/reference-pex-cli (for your version) has the version
option and the default is what Pants is using. Alternatively you can bump that up because PEX is always backwards-compatible.
• Then run pex3 lock create -r <requirements.txt> -o <output.lock>
with your input and output (output would be your setting of [<tool>].lockfile
pantsbuild/pants