diff options
author | Chris Jerdonek <chris.jerdonek@gmail.com> | 2012-09-22 20:14:23 -0700 |
---|---|---|
committer | Chris Jerdonek <chris.jerdonek@gmail.com> | 2012-09-22 20:14:23 -0700 |
commit | c32239c7a86dad0dfd13959ec7555812c412a1cc (patch) | |
tree | 4a80547747c73f4ec6e11c3228f2771fe22a23c8 /setup.py | |
parent | 85b1cdc94d1d78723d7ded8c128b4b521e56df90 (diff) | |
download | pystache-c32239c7a86dad0dfd13959ec7555812c412a1cc.tar.gz |
Change convert_md_to_rst() to return the converted text.
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -188,7 +188,7 @@ def convert_md_to_rst(path): """ Convert the given file from markdown to reStructuredText. - Returns the new path. + Returns the converted text as a unicode string. """ # We write the converted files to temp files to simplify debugging. @@ -207,7 +207,7 @@ def convert_md_to_rst(path): " Did you install pandoc per the %s docstring?" % (command, __file__)) sys.exit(s) - return temp_path + return read(temp_path) def write_long_description(target_path): @@ -219,17 +219,19 @@ def write_long_description(target_path): http://docs.python.org/distutils/setupscript.html#additional-meta-data """ - readme_path = convert_md_to_rst(README_PATH) - history_path = convert_md_to_rst(HISTORY_PATH) + readme_section = convert_md_to_rst(README_PATH) + history_section = convert_md_to_rst(HISTORY_PATH) - license = """\ + license_section = """\ License ======= """ + read(LICENSE_PATH) - sections = [LONG_DESCRIPTION_INTRO, read(readme_path), read(history_path), - license] + sections = [LONG_DESCRIPTION_INTRO, + readme_section, + history_section, + license_section] description = '\n'.join(sections) |