Skip to content

Commit d4678cb

Browse files
author
Michał Jaworski
committed
use new long_description_content_type to finally resolve problem of log description markup translation
1 parent d3b6230 commit d4678cb

File tree

2 files changed

+8
-17
lines changed

2 files changed

+8
-17
lines changed

setup.py

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ def get_version(version_tuple):
99
return '.'.join(map(str, version_tuple))
1010

1111

12+
def read(filename):
13+
with open(filename, 'r') as file:
14+
return file.read()
15+
16+
1217
init = os.path.join(
1318
os.path.dirname(__file__),
1419
'src', 'graceful', '__init__.py'
@@ -21,21 +26,6 @@ def get_version(version_tuple):
2126
'singledispatch',
2227
]
2328

24-
try:
25-
from pypandoc import convert
26-
27-
def read_md(f):
28-
return convert(f, 'rst')
29-
30-
except ImportError:
31-
convert = None
32-
print(
33-
"warning: pypandoc module not found, could not convert Markdown to RST"
34-
)
35-
36-
def read_md(f):
37-
return open(f, 'r').read() # noqa
38-
3929
README = os.path.join(os.path.dirname(__file__), 'README.md')
4030
PACKAGES = find_packages('src')
4131
PACKAGE_DIR = {'': 'src'}
@@ -46,7 +36,8 @@ def read_md(f):
4636
author='Michał Jaworski',
4737
author_email='[email protected]',
4838
description='Elegant Python REST toolkit built on top of falcon',
49-
long_description=read_md(README),
39+
long_description=read(README),
40+
long_description_content_type="text/markdown",
5041
packages=PACKAGES,
5142
package_dir=PACKAGE_DIR,
5243

src/graceful/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
It is inspired by Django REST Framework package. Mostly by how object
44
serialization is done but more emphasis is put on API to be self-descriptive.
55
"""
6-
VERSION = (0, 6, 1) # PEP 386 # noqa
6+
VERSION = (0, 6, 3) # PEP 386 # noqa
77
__version__ = ".".join([str(x) for x in VERSION]) # noqa

0 commit comments

Comments
 (0)