From badd18373ced972c090329a09dc7eb8c4e5638aa Mon Sep 17 00:00:00 2001 From: Jon Grace-Cox Date: Mon, 12 Aug 2019 10:23:12 -0400 Subject: [PATCH] Switch to using markdown for package documentation * Remove the markdown to rst conversion from setup.py. --- setup.py | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/setup.py b/setup.py index b24b6d8..14522cb 100644 --- a/setup.py +++ b/setup.py @@ -2,20 +2,9 @@ import os import re from setuptools import setup -from m2r import parse_from_file -import restructuredtext_lint -# Parser README.md into reStructuredText format -rst_readme = parse_from_file('README.md') - -# Validate the README, checking for errors -errors = restructuredtext_lint.lint(rst_readme) - -# Raise an exception for any errors found -if errors: - print(rst_readme) - raise ValueError('README.md contains errors: ', - ', '.join([e.message for e in errors])) +with open('README.md', 'r') as f: + readme_md = '\n'.join(f.readlines()) # Attempt to get version number from TravisCI environment variable version = os.environ.get('TRAVIS_TAG', default='0.0.0') @@ -26,7 +15,8 @@ version = re.sub('^v', '', version) setup( name='anybadge', description='Simple, flexible badge generator for project badges.', - long_description=rst_readme, + long_description=readme_md, + long_description_content_type='text/markdown', version=version, author='Jon Grace-Cox', author_email='jongracecox@gmail.com',