Skip to content

Commit c2e0cfa

Browse files
committed
Convert readme from markdown to rst for PyPI
1 parent 2497b47 commit c2e0cfa

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

requirements-dev.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
wheel
2+
pandoc==1.0.0-alpha.3

setup.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,14 @@
4444
# Extract name and e-mail ("Firstname Lastname <[email protected]>")
4545
AUTHOR, EMAIL = re.match(r'(.*) <(.*)>', AUTHOR_EMAIL).groups()
4646

47+
try:
48+
from pypandoc import convert
49+
read_md = lambda f: convert(f, 'rst')
50+
except ImportError:
51+
print('warning: pypandoc module not found, could not convert '
52+
'Markdown to RST')
53+
read_md = lambda f: open(f, 'r').read()
54+
4755
CLASSIFIERS = [
4856
'Development Status :: 5 - Production/Stable',
4957
'Environment :: Console',
@@ -68,6 +76,7 @@
6876
setup(name=PACKAGE,
6977
version=VERSION,
7078
description=DESCRIPTION,
79+
long_description=read_md('README.md'),
7180
author=AUTHOR,
7281
author_email=EMAIL,
7382
license=LICENSE,

0 commit comments

Comments
 (0)