Skip to content

Commit 6bc8452

Browse files
Carreauivanov
authored andcommitted
run pypandoc to convert README to ReST for PyPI
1 parent 25aeb88 commit 6bc8452

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

setup.py

+13-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
from distutils.core import setup
22

3+
with open('README.md') as f:
4+
data = f.read()
5+
try:
6+
import pypandoc
7+
description = pypandoc.convert(data, 'rst', format='markdown')
8+
except ImportError:
9+
print("pypandoc conversion failed, readme will not be rendered on PyPI")
10+
print("(You can ignore this if you're only doing local development)")
11+
description = data
12+
13+
314

415
extras_requires = {
516
':sys_platform == "win32"': ['pyreadline>=2'],
@@ -8,7 +19,7 @@
819

920
setup(
1021
name='rlipython',
11-
version='0.1.1',
22+
version='0.1.2',
1223
packages=['rlipython',],
1324
install_requires=["ipython>5.3"],
1425
extras_requires=extras_requires,
@@ -17,5 +28,5 @@
1728
author_email='[email protected]',
1829
url='https://github.com/ipython/rlipython',
1930
description="readline integration for IPython 5.4+ and 6.0+",
20-
long_description=open('readme.md').read(),
31+
long_description=description
2132
)

0 commit comments

Comments
 (0)