NLeSC / python-template

Netherlands eScience Center Python Template
https://research-software-directory.org/software/nlesc-python-template
Apache License 2.0
181 stars 76 forks source link

ssh instead of https URL in setup.cfg #350

Closed f-hafner closed 9 months ago

f-hafner commented 1 year ago

Issue

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/>                                                       
         &#x27;git@github.com:ivory-tower-private-power/sirup&#x27; 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.

Further information

egpbos commented 9 months ago

@sjvrijn this was fixed in #352, no?

sjvrijn commented 9 months ago

@egpbos Yep, those have been fixed