Python Package Registry will not accept packages with PKG-INFO Metadata version 2.4
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
When using the GitLab Python Package Index to publish development builds of a python package, the latest version of the Metadata format causes GitLab to announce that the version is unsupported [2]:
Using docker image sha256:d8d6e2d90e8f8f26e31c79d18e1d033e10ef0ba8e783054832a8b47bc132b289 for registry.gitlab.com/qemu-project/python-qemu-qmp/python:latest with digest registry.gitlab.com/qemu-project/python-qemu-qmp/python@sha256:382eb316a48c55d074244e237dd10d77e7c03651ea922c7c2da570c6321b6809 ...
$ TWINE_PASSWORD=${CI_JOB_TOKEN} TWINE_USERNAME=gitlab-ci-token python3 -m twine upload --verbose --repository-url "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/pypi" dist/*
Uploading distributions to
https://gitlab.com/api/v4/projects/35575318/packages/pypi
ERROR InvalidDistribution: Metadata is missing required fields: Name,
Version.
Make sure the distribution includes the files where those fields are
specified, and is using a supported Metadata-Version: 1.0, 1.1, 1.2,
2.0, 2.1, 2.2, 2.3.
Cleaning up project directory and file based variables 00:01
ERROR: Job failed: exit code 1
The setuptools package has produced metadata in this format since v77; see PEP 639: https://peps.python.org/pep-0639/#deprecate-license-field
[1] yml definition: https://gitlab.com/qemu-project/python-qemu-qmp/-/blob/main/.gitlab-ci.d/publish.yml?ref_type=heads#L25 [2] job failure log: https://gitlab.com/qemu-project/python-qemu-qmp/-/jobs/9916549007
Edited by 🤖 GitLab Bot 🤖