mirror of
https://github.com/jongracecox/anybadge.git
synced 2026-01-07 21:02:01 +01:00
Switch to using markdown for package documentation
* Remove the markdown to rst conversion from setup.py.
This commit is contained in:
18
setup.py
18
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',
|
||||
|
||||
Reference in New Issue
Block a user