From 34b6ebd1f653b32c73c73d3dad49a88e31bd7639 Mon Sep 17 00:00:00 2001 From: Chris Jerdonek Date: Thu, 10 May 2012 16:55:19 -0700 Subject: Fixed MANIFEST.in; setup.py now provides an error message about pandoc. --- setup.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'setup.py') 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 -- cgit v1.2.1