hatch-vcs icon indicating copy to clipboard operation
hatch-vcs copied to clipboard

How to comply with PEP440 when publishing non-tagged commits to PyPi Test

Open jimisola opened this issue 1 year ago • 9 comments

A project I recently got involved with are using hatch-vcs. However, we have an issue when we try to push to test.pypi.org as the commit has no tag with version number. It needs to comply with PEP440 (e.g. 0.2.1.dev36, .dev37) etc. We are using hatch-vcs with hatch, hatchling and twine ([pyproject.toml](["hatchling", "hatch-vcs", "build", "twine"]).

Is there a way to solve this? If not, is it something that could be added to hatch-vcs?

HTTPError: 400 Bad Request from https://test.pypi.org/legacy/          
         '0.2.1.dev36+gc535edb' is an invalid value for Version. Error: Can't   
         use PEP 4[40](https://github.com/hamnis/maven-artifact/actions/runs/5014026025/jobs/8987818809#step:7:41) local versions. See                                        
         https://packaging.python.org/specifications/core-metadata for more     
         information.

jimisola avatar May 18 '23 12:05 jimisola