summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MANIFEST.in2
-rw-r--r--setup.py14
-rw-r--r--setup_description.rst3
3 files changed, 14 insertions, 5 deletions
diff --git a/MANIFEST.in b/MANIFEST.in
index d7b83ca..4c2d8eb 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -1,7 +1,7 @@
include README.md
include HISTORY.md
include LICENSE
-include DESCRIPTION.rst
+include setup_description.rst
include tox.ini
include test_pystache.py
# You cannot use package_data, for example, to include data files in a
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
diff --git a/setup_description.rst b/setup_description.rst
index a1eeff3..4e97663 100644
--- a/setup_description.rst
+++ b/setup_description.rst
@@ -1,4 +1,5 @@
-.. This file is auto-generated by setup.py, so it should not be edited.
+.. 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.
Pystache
========