summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorChris Jerdonek <chris.jerdonek@gmail.com>2012-05-10 16:55:19 -0700
committerChris Jerdonek <chris.jerdonek@gmail.com>2012-05-14 10:22:04 -0700
commit34b6ebd1f653b32c73c73d3dad49a88e31bd7639 (patch)
tree88e4796d92d226fc3c19790f95020359b5644e7d /setup.py
parentea3eb8b848198ccce59011c975a28028fe393ba3 (diff)
downloadpystache-34b6ebd1f653b32c73c73d3dad49a88e31bd7639.tar.gz
Fixed MANIFEST.in; setup.py now provides an error message about pandoc.
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/setup.py b/setup.py
index fe3a074..686e27b 100644
--- a/setup.py
+++ b/setup.py
@@ -19,7 +19,7 @@ Generate the reStructuredText long_description using--
and be sure this new version is checked in. You must have pandoc installed
to do this step:
- http://johnmacfarlane.net/pandoc/
+ http://johnmacfarlane.net/pandoc/
It helps to review this auto-generated file on GitHub prior to uploading
because the long description will be sent to PyPI and appear there after
@@ -164,8 +164,8 @@ def make_description_file(target_path):
"""
# Comments in reST begin with two dots.
intro = """\
-.. This file is auto-generated by setup.py using pandoc, so any edits
-.. should go in the source markdown files.
+.. This file is auto-generated by setup.py for PyPI using pandoc, so this
+.. file should not be edited. Edits should go in the source files.
"""
readme_path = convert_md_to_rst(README_PATH)
@@ -224,10 +224,18 @@ def convert_md_to_rst(path):
temp_path = make_temp_path(path)
print("Converting: %s to %s" % (path, temp_path))
+ if os.path.exists(temp_path):
+ os.remove(temp_path)
+
# Pandoc uses the UTF-8 character encoding for both input and output.
command = "pandoc --write=rst --output=%s %s" % (temp_path, path)
os.system(command)
+ if not os.path.exists(temp_path):
+ s = ("Error running: %s\n"
+ " Did you install pandoc per the %s docstring?" % (command, __file__))
+ sys.exit(s)
+
return temp_path