poetry icon indicating copy to clipboard operation
poetry copied to clipboard

Support reading metadata from PEP 621 compliant pyproject.toml

Open ughstudios opened this issue 2 years ago • 8 comments

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 avatar Mar 17 '23 17:03 ughstudios

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?

ughstudios avatar Mar 17 '23 17:03 ughstudios

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.

dimbleby avatar Mar 17 '23 18:03 dimbleby

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.

finswimmer avatar Mar 26 '23 16:03 finswimmer

What's new?

Miuler avatar Jun 20 '23 20:06 Miuler

The lack of support for the standard pyproject.toml format breaks the usage of zest.releaser in Poetry projects. The library looks for the [project] section on the pyproject.toml file as specified by PEP 621 to determine the project's version number. While Poetry expects this attribute, as well as name, to be under [tool.poetry].

maribedran avatar Oct 03 '24 15:10 maribedran

@maribedran support for PEP 621 in Poetry was recently merged. This issue concerns reading package metadata from editable projects included in your Poetry projects.

Secrus avatar Oct 03 '24 15:10 Secrus

This is not completed

Secrus avatar Oct 30 '24 14:10 Secrus

This is not completed

it kind of is though, since setup_reader doesn't exist any more

ie the whole approach is now abandoned, so feature requests asking for it to be enhanced are unlikely to happen

dimbleby avatar Oct 30 '24 14:10 dimbleby