def get_long_description():
current_dir = path.abspath(path.dirname(__file__))
readme_path = path.join(current_dir, 'README.md')
with open(readme_path, encoding='utf-8') as f:
try:
import pypandoc
long_description = pypandoc.convert_text(f.read(), 'rst', 'markdown_github').replace('\r', '')
except(OSError, ImportError):
print('\n\n!!! pandoc not found. long_description is not correct. Do not upload this to PyPI. !!!\n\n')
long_description = f.read()
return long_description
评论列表
文章目录