When uploading the package to PyPI, I get the following error:
INFO Using configuration from /home/flavio/.pypirc
Uploading distributions to https://test.pypi.org/legacy/
INFO dist/sirup-0.1.0-py3-none-any.whl (14.5 KB)
INFO dist/sirup-0.1.0.tar.gz (19.4 KB)
INFO username set from config file
INFO Querying keyring for password
Enter your password:
INFO username: fhafner
INFO password: <hidden>
Uploading sirup-0.1.0-py3-none-any.whl
100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 26.6/26.6 kB • 00:00 • 96.3 MB/s
INFO Response from https://test.pypi.org/legacy/:
400 'git@github.com:ivory-tower-private-power/sirup' is an invalid value for Home-Page. Error: Invalid URI See
https://packaging.python.org/specifications/core-metadata for more information.
INFO <html>
<head>
<title>400 'git@github.com:ivory-tower-private-power/sirup' is an invalid value for Home-Page. Error: Invalid URI See
https://packaging.python.org/specifications/core-metadata for more information.</title>
</head>
<body>
<h1>400 'git@github.com:ivory-tower-private-power/sirup' is an invalid value for Home-Page. Error: Invalid URI See
https://packaging.python.org/specifications/core-metadata for more information.</h1>
The server could not comply with the request since it is either malformed or otherwise incorrect.<br/><br/>
'git@github.com:ivory-tower-private-power/sirup' is an invalid value for Home-Page. Error: Invalid URI See
https://packaging.python.org/specifications/core-metadata for more information.
</body>
</html>
ERROR HTTPError: 400 Bad Request from https://test.pypi.org/legacy/
'git@github.com:ivory-
The problem is that in dist/*.whl/*dist-info/METADATA (that is generated when running python -m build), Home-page should be the https address and not the ssh address of the github repository with the source code.
Solution
I solved the problem in setup.cfg by replacing the ssh address to the github repository with the https address to the repository, both for url and for Bug Tracker in project_urls. I don't know what needs to be fixed in the template though.
Issue
When uploading the package to PyPI, I get the following error:
The problem is that in
dist/*.whl/*dist-info/METADATA
(that is generated when runningpython -m build
),Home-page
should be the https address and not the ssh address of the github repository with the source code.Solution
I solved the problem in
setup.cfg
by replacing the ssh address to the github repository with the https address to the repository, both forurl
and forBug Tracker
inproject_urls
. I don't know what needs to be fixed in the template though.Further information
python -m build
, twine version 4.0.2