mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-24 03:29:28 +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.")
|
raise ImportError("Please install Setuptools and try again.")
|
||||||
from codecs import open
|
from codecs import open
|
||||||
import subprocess
|
import subprocess
|
||||||
from os import path
|
|
||||||
|
|
||||||
# Get version from Git tags.
|
# Get version from Git tags.
|
||||||
with open('VERSION', encoding='utf-8') as f:
|
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('__version__ = %r\n' % version)
|
||||||
f.write('real_version = %r\n' % real_version)
|
f.write('real_version = %r\n' % real_version)
|
||||||
|
|
||||||
curdir = path.abspath(path.dirname(__file__))
|
# Convert Markdown to RST for PyPI
|
||||||
|
try:
|
||||||
# FIXME: Convert markdown to RST
|
import pypandoc
|
||||||
with open(path.join(curdir, 'README.md'), encoding='utf-8') as f:
|
long_description = pypandoc.convert('README.md', 'rst')
|
||||||
long_description = f.read()
|
except ImportError:
|
||||||
|
print('WARNING: PyPandoc not available; skipping writing long description.')
|
||||||
|
long_description = None
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='pylinkirc',
|
name='pylinkirc',
|
||||||
|
Loading…
Reference in New Issue
Block a user