As I read it, PEP 621 prevents us from having metadata in artifacts we generate differ from its correspondent field in the project
table of pyproject.toml
.
However, on certain artifacts, particularly binary builds, we might need to add extra requirement entries to reflect compatibility of the artifact. So, my question is, does PEP 621 prevent this?
In meson-python, we are planning on adding a way for users to add extra requirements based on the version of the dependencies we built against. Eg. if I built a wheel against numpy==1.24.2
and pythran==0.12.1
, I will want to add numpy>=1.24.2
and pythran==0.12.*
to the wheel requirements.
For this, we will let the user specify which “extra” runtime dependencies via a config setting, where they will be able to say which packages they want to pin, and how to pin the version (eg. let them say if they want to pin 1
, 1.24
, or 1.24.2
, etc. for when numpy==1.24.2
).
Do we need now to move the dependencies from project.dependencies
to a tool-specific field? In my interpretation of the PEP, I think so, yes, though it’s not super clear.
I don’t think preventing backends to add extra dependencies to binary artifacts to reflect extra requirements of that particular build makes sense, so I’d like to add text to PEP 621 to explicitly allow this.