38
38
os .system ('python setup.py sdist upload -r pypi' )
39
39
sys .exit ()
40
40
41
- # Convert README.md to README.rst for pypi
42
- try :
43
- from pypandoc import convert_file
44
-
45
- def read_md (f ):
46
- return convert_file (f , 'rst' )
47
-
48
- # read_md = lambda f: convert(f, 'rst')
49
- except :
50
- print ('warning: pypandoc module not found, '
51
- 'could not convert Markdown to RST' )
52
-
53
- def read_md (f ):
54
- return open (f , 'rb' ).read ().decode (encoding = 'utf-8' )
55
- # read_md = lambda f: open(f, 'rb').read().decode(encoding='utf-8')
56
-
57
-
58
41
class PyTest (TestCommand ):
59
42
def finalize_options (self ):
60
43
TestCommand .finalize_options (self )
@@ -74,7 +57,9 @@ class PyTestIntegration(PyTest):
74
57
def finalize_options (self ):
75
58
self .test_args = ['--strict' , '--verbose' , '--tb=long' , 'test/integration' ]
76
59
77
-
60
+ with open ("README.md" , "r" ) as fh :
61
+ readme = fh .read ()
62
+
78
63
setup (name = PACKAGE_NAME .replace ('_' , '-' ),
79
64
version = __version__ ,
80
65
description = PACKAGE_DESC ,
@@ -84,7 +69,8 @@ def finalize_options(self):
84
69
cmdclass = {'test' : PyTest , 'test_unit' : PyTestUnit , 'test_integration' : PyTestIntegration },
85
70
author = 'IBM' ,
86
71
87
- long_description = read_md ('README.md' ),
72
+ long_description = readme ,
73
+ long_description_content_type = 'text/markdown' ,
88
74
url = 'https://github.com/IBM/platform-services-python-sdk' ,
89
75
packages = [PACKAGE_NAME ],
90
76
include_package_data = True ,
0 commit comments