summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Kögl <stefan@skoegl.net>2014-10-25 15:24:44 +0200
committerStefan Kögl <stefan@skoegl.net>2014-10-25 15:24:44 +0200
commit7c4a5fcf15a4e577067a67364fa379ddb3acb555 (patch)
tree17610595c5d597753f7b5489a4bc3a0abfdaaea1
parent88a966bb22e1d5f9156662e21f8f67f8f6a50ba7 (diff)
downloadpython-json-pointer-7c4a5fcf15a4e577067a67364fa379ddb3acb555.tar.gz
Convert readme from markdown to rst for PyPI
-rw-r--r--requirements-dev.txt1
-rw-r--r--setup.py9
2 files changed, 10 insertions, 0 deletions
diff --git a/requirements-dev.txt b/requirements-dev.txt
index 2309722..fd0fd6c 100644
--- a/requirements-dev.txt
+++ b/requirements-dev.txt
@@ -1 +1,2 @@
wheel
+pandoc==1.0.0-alpha.3
diff --git a/setup.py b/setup.py
index a618e86..c002302 100644
--- a/setup.py
+++ b/setup.py
@@ -26,6 +26,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',
@@ -49,6 +57,7 @@ CLASSIFIERS = [
setup(name=PACKAGE,
version=VERSION,
description=DESCRIPTION,
+ long_description=read_md('README.md'),
author=AUTHOR,
author_email=EMAIL,
license=LICENSE,