[Catalog-sig] What triggers treating long descriptions text as reST in PyPI?
Richard Jones
richardjones at optushome.com.au
Thu Sep 7 14:51:52 CEST 2006
On Thursday 07 September 2006 21:42, Jim Fulton wrote:
> Most of my packages' long descriptions are treated as reST. For example:
>
> http://www.python.org/pypi/zc.recipe.testrunner
>
> However, for:
>
> http://www.python.org/pypi/zc.recipe.egg
>
> the long description was treated as plain text.
>
> What triggers treatment as reStructuredText? Is this documented
> anywhere?
If the reStructuredText parsing fails for some reason it'll be treated as
plain text. The specific docutils settings used are:
settings_overrides={
'raw_enabled': '0', # no raw HTML code
'file_insertion_enabled': '0', # no file/URL access
'halt_level': 2, # at warnings or errors, raise an exception
'report_level': 5, # never report problems with the reST code
}
We pass the description through the docutils trim_docstring function (from
docutils.readers.python.moduleparser) before parsing it. This dedents as
appropriate.
Richard
More information about the Catalog-sig
mailing list