Update
As of Sep 21, 2018, the Python Packaging Authority recommends an alternative command twine check
. To install twine:
pip install twine
twine check dist/*
Note that twine requires readme_renderer
. You could still use readme_renderer
, and you only need to install twine if you want its other features, which is a good idea anyway if you are releasing to PyPI.
From the official Python packaging docs, Uploading your Project to PyPI:
Tip: The reStructuredText parser used on PyPI is not Sphinx! Furthermore, to ensure safety of all users, certain kinds of URLs and directives are forbidden or stripped out (e.g., the .. raw::
directive). Before trying to upload your distribution, you should check to see if your brief / long descriptions provided in setup.py
are valid. You can do this by following the instructions for the pypa/readme_renderer tool.
And from that tool's README.rst
:
To check your long description's locally simply install the readme_renderer
library using:
$ pip install readme_renderer
$ python setup.py check -r -s
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…