setup.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:django-csv-export-view 作者: benkonrath 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号