Get the latest tech news
Constraints Are Good: Python's Metadata Dilemma
Some of the issues of why Python packaging is unnecessarily hard.
However build systems are entirely allowed to override that by falling back to what is called “dynamic metadata” and this is something that is commonly done. Today for instance advanced resolvers like poetry or uv sometimes are not able to install the right packages, because they assume that dependency metadata is consistent across sdists and wheels. For instance there is a plugin for hatch that dynamically creates a readme , requiring even arbitrary Python code to run to display documentation.
Or read this on Hacker News