Skip to content

Commit

Permalink
Use readme for long description
Browse files Browse the repository at this point in the history
  • Loading branch information
Greg Turner committed May 22, 2017
1 parent ce8bcc7 commit 68237fc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include *.rst
17 changes: 4 additions & 13 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,9 @@
import setuptools
import sys

# Convert README.md to reStructuredText.
if {'bdist_wheel', 'sdist'}.intersection(sys.argv):
try:
import pypandoc
except ImportError:
print('WARNING: You should install `pypandoc` to convert `README.md` '
'to reStructuredText to use as long description.',
file=sys.stderr)
else:
print('Converting `README.md` to reStructuredText to use as long '
'description.')
long_description = pypandoc.convert('README.md', 'rst')
def readme():
with open('README.rst') as f:
return f.read()

setuptools.setup(
name='edtf',
Expand All @@ -24,7 +15,7 @@
author_email='greg@interaction.net.au',
description='Python implementation of Library of Congress EDTF (Extended '
'Date Time Format) specification',
long_description=locals().get('long_description', ''),
long_description=readme(),
license='MIT',
packages=setuptools.find_packages(),
include_package_data=True,
Expand Down

0 comments on commit 68237fc

Please sign in to comment.