Skip to content

Commit 7c4a5fc

Browse files
committed
Convert readme from markdown to rst for PyPI
1 parent 88a966b commit 7c4a5fc

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
@@ -26,6 +26,14 @@
2626
# Extract name and e-mail ("Firstname Lastname <[email protected]>")
2727
AUTHOR, EMAIL = re.match(r'(.*) <(.*)>', AUTHOR_EMAIL).groups()
2828

29+
try:
30+
from pypandoc import convert
31+
read_md = lambda f: convert(f, 'rst')
32+
except ImportError:
33+
print('warning: pypandoc module not found, could not convert '
34+
'Markdown to RST')
35+
read_md = lambda f: open(f, 'r').read()
36+
2937
CLASSIFIERS = [
3038
'Development Status :: 5 - Production/Stable',
3139
'Environment :: Console',
@@ -49,6 +57,7 @@
4957
setup(name=PACKAGE,
5058
version=VERSION,
5159
description=DESCRIPTION,
60+
long_description=read_md('README.md'),
5261
author=AUTHOR,
5362
author_email=EMAIL,
5463
license=LICENSE,

0 commit comments

Comments
 (0)