summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorChris Jerdonek <chris.jerdonek@gmail.com>2012-09-22 20:14:23 -0700
committerChris Jerdonek <chris.jerdonek@gmail.com>2012-09-22 20:14:23 -0700
commitc32239c7a86dad0dfd13959ec7555812c412a1cc (patch)
tree4a80547747c73f4ec6e11c3228f2771fe22a23c8 /setup.py
parent85b1cdc94d1d78723d7ded8c128b4b521e56df90 (diff)
downloadpystache-c32239c7a86dad0dfd13959ec7555812c412a1cc.tar.gz
Change convert_md_to_rst() to return the converted text.
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/setup.py b/setup.py
index 330de7e..5cb6cdc 100644
--- a/setup.py
+++ b/setup.py
@@ -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)