Skip to content

Commit

Permalink
Fix setup.py for render of readme for pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
wasade committed Feb 19, 2019
1 parent e6f5db8 commit b2901ec
Showing 1 changed file with 3 additions and 16 deletions.
19 changes: 3 additions & 16 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,34 +35,21 @@ def run(self):
_post()


class sdistCommand(sdist):
def run(self):
# verify that we can actually do the converstion
import pypandoc
long_description = pypandoc.convert('README.md', 'rst')
sdist.run(self)


# pypi does not render markdown.
# https://stackoverflow.com/a/26737672/19741
try:
import pypandoc
long_description = pypandoc.convert('README.md', 'rst')
except(IOError, ImportError):
long_description = open('README.md').read()
long_description = open('README.md').read()


# adapted from q2cli's setup.py

setup(
name='redbiom',
version='0.3.0',
version='0.3.1',
license='BSD-3-Clause',
author='Daniel McDonald',
author_email='[email protected]',
url='https://github.com/biocore/redbiom',
packages=find_packages(),
long_description=long_description,
long_description_content_type='text/markdown',
include_package_data=True,
install_requires=['click >= 6.7', 'biom-format >= 2.1.5',
'requests', 'h5py', 'pandas', 'nltk',
Expand Down

0 comments on commit b2901ec

Please sign in to comment.