Jeff Rush <[email protected]> writes:
> The long_description field is also a reStructuredText field and as
> such, for the developer to preview it during its composure, it needs
> to be left-aligned. While a developer -could- cut/paste it into a
> separate text file each time he wants to test preview it, that would
> be annoying.
I get my ‘description’ and ‘long_description’ field not directly from a
text file, but from the package docstring. Following the usual docstring
interpretation conventions as per PEP 257, I trim all common leading
indentation from non-blank lines:
import textwrap
import foopackage
short_description, long_description = (
textwrap.dedent(d).strip()
for d in main_module.__doc__.split('\n\n', 1))
If we want to allow a multi-line option value in a configuration file,
we could define the interpretation of that value by the same or similar
convention.
--
\ “Well, my brother says Hello. So, hooray for speech therapy.” |
`\ —Emo Philips |
_o__) |
Ben Finney
_______________________________________________
Distutils-SIG maillist - [email protected]
http://mail.python.org/mailman/listinfo/distutils-sig