pypa / gh-action-pypi-publish

The blessed :octocat: GitHub Action, for publishing your :package: distribution files to PyPI, the tokenless way: https://github.com/marketplace/actions/pypi-publish
https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
BSD 3-Clause "New" or "Revised" License
930 stars 87 forks source link

ERROR `long_description` has syntax errors in markup and would not be rendered on PyPI. No content rendered from RST source. #249

Closed bruhnugget-nice closed 3 months ago

bruhnugget-nice commented 3 months ago

Repo: https://github.com/bruhnugget-nice/keras_saver

I tried to deploy a package on PyPI with my API token and everything set up, I even have a long_description attribute on my setup.py file, can someone explain what is going on here?

webknjaz commented 3 months ago

Your build backend produced a distribution with description that doesn't contain proper markup or type in its long description. PyPI won't accept it: https://packaging.python.org/en/latest/guides/making-a-pypi-friendly-readme/#including-your-readme-in-your-package-s-metadata.

You can use twine check --strict to check that said metadata is valid. I see that you use a 3-years old version of this action, so it's possible that some old software from back then is unable to verify it correctly.

Update it and follow the guide to the letter: https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/.

webknjaz commented 3 months ago

I see you also don't have a PEP 517 spec declared in pyproject.toml, which might be related to your issue.

https://packaging.python.org/en/latest/guides/modernize-setup-py-project/ https://packaging.python.org/en/latest/guides/writing-pyproject-toml/