3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-27 21:19:31 +01:00

setup.py: convert Markdown to RST using pypandoc

This commit is contained in:
James Lu 2016-08-04 00:27:15 -07:00
parent d855c6b2ea
commit 1e4044fdf7

View File

@ -11,7 +11,6 @@ except ImportError:
raise ImportError("Please install Setuptools and try again.")
from codecs import open
import subprocess
from os import path
# Get version from Git tags.
with open('VERSION', encoding='utf-8') as f:
@ -29,11 +28,13 @@ with open('__init__.py', 'w') as f:
f.write('__version__ = %r\n' % version)
f.write('real_version = %r\n' % real_version)
curdir = path.abspath(path.dirname(__file__))
# FIXME: Convert markdown to RST
with open(path.join(curdir, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
# Convert Markdown to RST for PyPI
try:
import pypandoc
long_description = pypandoc.convert('README.md', 'rst')
except ImportError:
print('WARNING: PyPandoc not available; skipping writing long description.')
long_description = None
setup(
name='pylinkirc',