we're moving from many separate poetry projects in...
# general
b
we're moving from many separate poetry projects into a single pants codebase.
poetry add somelibrary
worked well for it to find the latest version and add a
^
constraint in our
pyproject.toml
. Is there a similarly convenient way to manage our
3rdparty/python/requirements.txt
as we build that up? Or how are y'all managing 3rdparty version constraints? I'm excited to have them all in one place instead of (potentially conflicting) in many
pyproject.toml
s sprinkled throughout our source tree!
some munging with
poetry add $(cat requirements.txt)
got me bootstrapped but it's not great for ongoing maintenance
b
What we do to manage this is keep a single
pyproject.toml
file in the root of the repo, and we use Poetry to add dependencies to it rather than Pants. We use the
poetry_requirements
target to keep the two synced: https://www.pantsbuild.org/2.18/reference/targets/poetry_requirements Initially migrating to a single
pyproject.toml
was tough but it’s been really nice since then!
b
yeah I think I'll do that too