Skip to content

Commit 6eb4b57

Browse files
jwoddertheacodes
authored andcommitted
Added a section on checking RST markup (pypa#554)
* Added a section on checking RST markup * Recommend `twine check` instead
1 parent 8dfdba3 commit 6eb4b57

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

source/guides/making-a-pypi-friendly-readme.rst

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,27 @@ and identifies the markup as GitHub-flavored Markdown:
8181
long_description=long_description,
8282
long_description_content_type='text/markdown'
8383
)
84+
85+
86+
Validating reStructuredText markup
87+
----------------------------------
88+
89+
If your README is written in reStructuredText, any invalid markup will prevent
90+
it from rendering, causing PyPI to instead just show the README's raw source.
91+
You can check your README for markup errors before uploading as follows:
92+
93+
1. Install the latest version of `twine <https://github.com/pypa/twine>`_;
94+
version 1.12.0 or higher is required::
95+
96+
pip install --upgrade twine
97+
98+
2. Build the sdist and wheel for your project as described under
99+
:ref:`Packaging Your Project`.
100+
101+
3. Run ``twine check`` on the sdist and wheel::
102+
103+
twine check dist/*
104+
105+
This command will report any problems rendering your README. If your markup
106+
renders fine, the command will output ``Checking distribution FILENAME:
107+
Passed``.

0 commit comments

Comments
 (0)