From d6c8793d605471d1187a8a12bfd220f8839681cb Mon Sep 17 00:00:00 2001 From: Felix Bauer Date: Thu, 11 Jan 2018 15:04:02 +0100 Subject: [PATCH] Use pypandoc to convert markdown to pypi friendly format See https://pypi.python.org/pypi/django-migration-linter And then see https://stackoverflow.com/questions/26737222/pypi-description-markdown-doesnt-work --- setup.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 3ec8a73..3a7e1c8 100644 --- a/setup.py +++ b/setup.py @@ -19,8 +19,11 @@ from setuptools import setup, find_packages PROJECT_DIR = path.abspath(path.dirname(__file__)) -with open(path.join(PROJECT_DIR, 'README.md'), encoding='utf-8') as f: - long_description = f.read() +try: + import pypandoc + long_description = pypandoc.convert('README.md', 'rst') +except(IOError, ImportError): + long_description = open('README.md').read() install_requirements = [ ]