I don’t have time at the moment to address the question of the format of the metadata (I’m in favor of some variation of
METADATA rather than
pyproject.toml) or what can and cannot be specified, but one thing I’d like to suggest is that whatever the format of the static metadata, it might be a good idea to store it in a gzip extra field. There’s also something analogous for zip files. There’s currently an open bug for adding support for this to the standard library, but I think writing ad hoc code to read the extra fields wouldn’t be too hard.
This seems like it would be particularly useful if we’re going to continue using the
.tar.gz format, since there’s no way to get at individual files within the tarball without first decompressing the whole thing, which I think would be much slower than jumping to an address in memory and reading the data there for large source tarballs (and source tarballs may easily be large if they contain tests with test data).
I believe we could specify each metadata field separately using the format itself, but probably the easiest thing to do would just have a field called something like
PY_SDIST_METADATA or whatever the naming convention is containing the contents of whatever file we choose for metadata.