Aamir Rind
Aamir Rind

Reputation: 39659

reStructuredText: README.rst not working on PyPI

I have created a package on github django-joyride, after publishing it to pypi it is not showing the README.rst properly. I have checked my syntax here on an online viewer and you can see it works fine. What could be the issue?

Upvotes: 5

Views: 1049

Answers (2)

Natesh bhat
Natesh bhat

Reputation: 13192

I had the same problem when uploading my python module to pypi .

Later I checked the README.rst for errors using rst-lint which showed that my readme file was right. You can also use restructuredtext_link package for python to check the rst file for any errors or warnings .

I found that the problem was not in the README file but in setup.py itself.

Follow the below points while writing Readme and setup.py

  • DO NOT WRITE MULTI LINE python strings for description or summary or anything that goes into the setup( ) arguments .
  • Don't use relative links in the README file .(like ./path1/path2 ).
  • Make sure the rst syntax is all right using a checking tool like rst-lint.
  • If you have a markdown file , you can convert it to Restructured text using pandoc easily.

Also do not use any new docutils syntax since Pypi doesn't use the latest version as Github does.

Upvotes: 2

cweiske
cweiske

Reputation: 31078

It could be that pypi gets confused because you have both a README.md and a README.rst file. Try to delete the .md one; github can handle README.rst fine.

Upvotes: 0

Related Questions