diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..bb37a27 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1 @@ +include *.rst diff --git a/setup.py b/setup.py index 3f4b18d..2b1a63d 100644 --- a/setup.py +++ b/setup.py @@ -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', @@ -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,