Skip to content

Commit 126e5f0

Browse files
committed
Add long_description
1 parent f520829 commit 126e5f0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

setup.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,15 @@ def _get_source_files():
120120
yield os.path.join(root, filename)
121121

122122

123+
def _get_long_description():
124+
"""Helper to populate long_description for pypi releases"""
125+
try:
126+
import pypandoc
127+
return pypandoc.convert('README.md', 'rst')
128+
except ImportError:
129+
return '.Net and Mono integration for Python'
130+
131+
123132
class BuildExtPythonnet(build_ext.build_ext):
124133
def build_extension(self, ext):
125134
"""Builds the .pyd file using msbuild or xbuild"""
@@ -364,6 +373,7 @@ def run(self):
364373
license='MIT',
365374
author="The Python for .Net developers",
366375
setup_requires=setup_requires,
376+
long_description=_get_long_description(),
367377
ext_modules=[
368378
Extension("clr", sources=list(_get_source_files()))
369379
],

0 commit comments

Comments
 (0)