Search code examples
pythongithubpackagepackaging

What format for a Python package's README on github?


The Python distutils in setup.py looks for README and README.txt in the root directory of a package. github recognizes formats like README.md and README.rst. How do I write one formatted root level README file that satisfies both?

The only suggestion I've seen up here is to run Pandoc to covert between the formats. I'd like to avoid adding an extra build step if possible.

Is there some way to tell distutils "Use my README.rst"?

Alternately, are there any bad repercussions of ignoring this warning when I run python setup.py sdist?

warning: sdist: standard file not found: should have one of README, README.txt

PS. I'm using distutils.core because Google leads me here. Is that out of date?


Solution

  • Looks like the answer is to use setuptools instead of distutils.core. If you follow the setuptools instructions you can see how to make your default README an .rst file.