Hey folks, I’m struggling to understand how to def...
# general
m
Hey folks, I’m struggling to understand how to define a
python_distribution
that pulls the package name and version from
pyproject.toml
— this slack mentions this in a few places, and there’s an open issue that seems to cover the same thing, but I don’t know if there’s some recommended way to use
pyproject.toml
as the authoritative source for the package being built — does anyone have advice?
h
To clarify, you are not using the Pants-generated setup.py but instead you want to build distributions off a manually written pyproject.toml?
m
That is correct; though I hadn’t realised that a pants-generated
setup.py
was preferred! (I’m using poetry to manage my dependencies, both external and internal, and that felt like it required a pyproject.toml, and I proceeded from there!)
h
It's not necessarily preferred. That code is very old, but it does do some useful things.
So you will need to repeat at least the project name in the
python_distribution
target. This is so that when figuring out which other distributions depend on yours, Pants knows which one your target creates
👍 1
If that makes sense
m
Yeah, that makes sense, thanksd! I’m still getting my head around a lot of this, I really appreciate your help 😊