Skip to content

Commit 9ce2736

Browse files
committed
catch pypandoc issues in setup.py. fixes #11
1 parent bc22887 commit 9ce2736

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

setup.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,17 @@
88
"""
99

1010
from distutils.core import setup
11+
import sys
12+
1113
try:
1214
import pypandoc
13-
LDESC = pypandoc.convert('README.md', 'rst')
15+
LDESC = pypandoc.convert_file('README.md', 'rst', format='md')
1416
except (IOError, ImportError):
17+
sys.stderr.write("pypandoc ist not available. Cannot convert the REAMDE from Markdown to rST.\n")
18+
LDESC = ''
19+
except Exception as e:
20+
sys.stderr.write("The conversion of the README to rST format failed with the following error:\n")
21+
sys.stderr.write(str(e) + '\n')
1522
LDESC = ''
1623

1724
setup(name='wsgi-request-logger',

0 commit comments

Comments
 (0)