mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-01 01:09:22 +01:00
setup.py: convert Markdown to RST using pypandoc
This commit is contained in:
parent
d855c6b2ea
commit
1e4044fdf7
13
setup.py
13
setup.py
@ -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',
|
||||
|
Loading…
Reference in New Issue
Block a user