duckinator / bork

A Python build and release management tool.
https://bork.readthedocs.io
MIT License
12 stars 2 forks source link

Handle dynamic project metadata #339

Closed nbraud closed 3 weeks ago

nbraud commented 9 months ago

bork build fails if pyproject.toml doesn't contain project.name.

While PEP 621 guarantees that name is (statically) defined if the project table exists, it also specifies

The lack of a [project] table implicitly means the build back-end will dynamically provide all fields.

In that case, bork should call {build-backend}.prepare_metadata_for_build_wheel and extract the metadata from the .dist-info directory that was populated.

duckinator commented 9 months ago

Oh, this means we can probably remove all remaining explicit references to setup.cfg, nice!

duckinator commented 9 months ago

As @AstraLuma mentions in #349:

bork zipapps require that a project table appears in pyproject.toml. Poetry-based projects use tool.poetry instead.

So an example project using Poetry would provide a good testcase for this functionality.

duckinator commented 8 months ago

352 appears to be a manifestation of this.