I am trying to upload my package with twine upload dist/*
command. and I get an error:
Client Error: 'X.Y.ZZ.post0.dev0-g83905ac' is an invalid value for Version. Error:
It looks to me that X.Y.ZZ.post0.dev0-g83905ac
version does satisfy PEP 440. I don't understand what is going on.
I have created annotetade tag, etc. I think I have created the tag already.
$ git tag -a vX.Y.ZZ # Don't forget the leading v
fatal: tag 'vX.Y.ZZ' already exists
I have noticed that the sdist command returns error:
user:package user-13$ python3 setup.py sdist
/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/setuptools/dist.py:483: UserWarning: The version specified ('X.Y.ZZ.post0.dev0+g83905ac') is an invalid version, this may not work as expected with newer versions of setuptools, pip, and PyPI. Please see PEP 440 for more details.
"details." % self.metadata.version
I do have the newest versions of everything:
user:package user-13$ pip3 --version
pip 19.2.3 from /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip (python 3.7)
user: package femto-13$ python3 --version
Python 3.7.4
user: package femto-13$ twine --version
twine version 1.14.0 (pkginfo: 1.5.0.1, requests: 2.22.0, setuptools: 41.2.0,
requests-toolbelt: 0.9.1, tqdm: 4.35.0)
History:
917 git tag -a vX.Y.ZZ # Don't forget the leading v
918 git push origin vX.Y.ZZ
919 python3 setup.py sdist
920 python3 setup.py bdist_wheel
921 twine upload dist/*
Here is result of twine command:
user:package user-13$ twine upload dist/*
Uploading distributions to https://upload.pypi.org/legacy/
Uploading py_package-X.Y.ZZ.post0.dev0_g83905ac-py3-none-any.whl
100%|███████████████████████████████████████████████████████████████████████| 18.5k/18.5k [00:00<00:00, 37.9kB/s]
NOTE: Try --verbose to see response content.
HTTPError: 400 Client Error: 'X.Y.ZZ.post0.dev0-g83905ac' is an invalid value for Version. Error: Start and end with a letter or numeral containing only ASCII numeric and '.', '_' and '-'. See https://packaging.python.org/specifications/core-metadata for url: https://upload.pypi.org/legacy/
I have updated tag to 0.0.1 and erased all X.Y.Z tags.