Commits

Ahmad Khayyat committed 5dac4c2

Use README.txt if present in setup.py

The original README.md is written in markdown.
PyPI recognizes only restructured text (rst).
If README.txt is present (converted from README.md using pandoc),
use it for long_description in setup.py.
Otherwise, use the markdown version (README.md).

Comments (0)

Files changed (1)

 from distutils.core import setup
 
+import os
+if os.path.exists("README.txt"):
+    readme = open("README.txt")
+else:
+    print "Warning: using markdown README"
+    readme = open("README.md")
+
 setup(
     name = "mezzanine-pagedown",
     version = "0.1",
     description = "PageDown rich text widget for Mezzanine",
-    long_description = open("README.md").read(),
+    long_description = readme.read(),
     author = "Ahmad Khayyat",
     author_email = "akhayyat@gmail.com",
     license = "BSD",