Commit a80534f2 authored by David Verelst's avatar David Verelst
Browse files

if pandoc installed also save RST version of README.md

parent 47d4d8d3
......@@ -14,7 +14,10 @@ from setuptools import setup
try:
from pypandoc import convert_file
read_md = lambda f: convert_file(f, 'rst')
read_md = lambda f: convert_file(f, 'rst', format='md')
# auto-create RST version of README
with open('README', 'w') as f:
f.write(read_md('README.md'))
except ImportError:
print("warning: pypandoc module not found, could not convert Markdown to RST")
read_md = lambda f: open(f, 'r').read()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment