python-poetry / poetry

Python packaging and dependency management made easy
https://python-poetry.org
MIT License
30.83k stars 2.25k forks source link

Support reading metadata from PEP 621 compliant pyproject.toml #7669

Open ughstudios opened 1 year ago

ughstudios commented 1 year ago

Flit-core uses a dependencies block to determine requirements.

https://flit.pypa.io/en/stable/pyproject_toml.html?highlight=dependencies#dependencies

But if you look at utils/setup_reader.py -> read_setup_cfg() it only checks for "python_requires", "install_requires...etc"

Could we add support for other backends?

Also it looks like it's only able to get the requirements from setup.py or setup.cfg, why doesn't it read pyproject.toml?

ughstudios commented 1 year ago

Why can't poetry grab the info for the package from pyproject.toml? Why is it only gathering this data from setup.py or setup.cfg?

dimbleby commented 1 year ago

duplicate #3332, please close

edit: I see from your pull request that you are aiming at a very specific use case - so this isn't a duplicate after all. I'll make some comments over there.

finswimmer commented 1 year ago

I've edited the title of this ticket, because it was misleading. Poetry is able to gather metadata from flit and other, as long as they are PEP 518 compliant. Until now setup.py was a first class citizen, to avoid unnecessary builds to get the final metadata. For all other build-backend Poetry falls back to build the wheel file to have access to metadata it needs.

Miuler commented 1 year ago

What's new?