summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorStefan Kögl <stefan@skoegl.net>2014-10-25 15:28:04 +0200
committerStefan Kögl <stefan@skoegl.net>2014-10-25 15:28:04 +0200
commitc2e0cfad28c4d09c53abf9c8e112fc3669e16a0d (patch)
treea158ccf28bc963ffbdf82fcc2a756279575f26ce /setup.py
parent2497b47158e8d8ddda120231599e1549505f3efd (diff)
downloadpython-json-patch-c2e0cfad28c4d09c53abf9c8e112fc3669e16a0d.tar.gz
Convert readme from markdown to rst for PyPI
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/setup.py b/setup.py
index 8f515b1..d31b990 100644
--- a/setup.py
+++ b/setup.py
@@ -44,6 +44,14 @@ DESCRIPTION = docstrings[0]
# Extract name and e-mail ("Firstname Lastname <mail@example.org>")
AUTHOR, EMAIL = re.match(r'(.*) <(.*)>', AUTHOR_EMAIL).groups()
+try:
+ from pypandoc import convert
+ read_md = lambda f: convert(f, 'rst')
+except ImportError:
+ print('warning: pypandoc module not found, could not convert '
+ 'Markdown to RST')
+ read_md = lambda f: open(f, 'r').read()
+
CLASSIFIERS = [
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
@@ -68,6 +76,7 @@ CLASSIFIERS = [
setup(name=PACKAGE,
version=VERSION,
description=DESCRIPTION,
+ long_description=read_md('README.md'),
author=AUTHOR,
author_email=EMAIL,
license=LICENSE,