https://pantsbuild.org/ logo
#general
Title
# general
a

adamant-magazine-16751

10/11/2022, 9:39 AM
Is there a faster way to add one new package to requirements and recalculate lockfile than "generate-lockfiles"? Something similar to what tools like poetry or pdm have (e.g. pdm add). The "manually add to requirements.txt and generate-lockfiles" workflow takes very long in our case, and it doesn't change at all during subsequent runs
👀 1
It dramatically speeds up running all the other command such as run, package etc. but "generate-lockfiles" itself takes long
b

bitter-ability-32190

10/11/2022, 1:33 PM
We use
pip-compile
to go from
<http://requirements.in|requirements.in>
to
requirements.txt
, then feed the
requirements.txt
to
pex3 lock
, and tell Pants to not check for lockfile metadata. You can also sandbox these tools inside of Pants: https://pantsbuild.slack.com/archives/C046T6T9U/p1665169182762299 And of course, a nice script that invokes both 🙂
h

hundreds-father-404

10/11/2022, 1:43 PM
This ticket tracks your suggestion https://github.com/pantsbuild/pants/issues/15704
7 Views