Skip to content

Commit

Permalink
Merge pull request #26 from florisla/readable-readme
Browse files Browse the repository at this point in the history
Read README as utf-8 text and set the content_type to text/markdown
  • Loading branch information
c4urself committed Aug 24, 2018
2 parents 4fe7784 + cc00ff2 commit b94faba
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions setup.py
@@ -1,13 +1,14 @@
import re
import io
import os
from setuptools import setup

description = 'Version-bump your software with a single command!'

long_description = re.sub(
"\`(.*)\<#.*\>\`\_",
r"\1",
str(open('README.md', 'rb').read()).replace(description, '')
)
# Import the README and use it as the long-description.
# This requires 'README.md' to be present in MANIFEST.in.
here = os.path.abspath(os.path.dirname(__file__))
with io.open(os.path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = '\n' + f.read()

setup(
name='bump2version',
Expand All @@ -19,6 +20,7 @@
packages=['bumpversion'],
description=description,
long_description=long_description,
long_description_content_type='text/markdown',
entry_points={
'console_scripts': [
'bumpversion = bumpversion:main',
Expand Down

0 comments on commit b94faba

Please sign in to comment.