From d5f67bf0f17aad8a2521a8ff109d58f0d7bd29bb Mon Sep 17 00:00:00 2001 From: caspervdw Date: Mon, 26 Oct 2015 19:57:57 +0100 Subject: [PATCH] DOC Use pypandoc for pypi docs conversion --- setup.py | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index ebfb556..0889d0c 100644 --- a/setup.py +++ b/setup.py @@ -2,19 +2,26 @@ from setuptools import setup -def read(fname): - return open(os.path.join(os.path.dirname(__file__), fname)).read() +try: + descr = open(os.path.join(os.path.dirname(__file__), 'README.md')).read() +except IOError: + descr = '' +try: + from pypandoc import convert + descr = convert(descr, 'rst', format='md') +except ImportError: + pass setup_parameters = dict( name="pims_nd2", - version="0.2", + version="0.3", description="ND2SDK wrapper for PIMS", author="Casper van der Wel", install_requires=['pims>=0.3'], author_email="caspervdw@gmail.com", url="https://github.com/soft-matter/pims_nd2", - download_url="https://github.com/soft-matter/pims_nd2/tarball/0.1", + download_url="https://github.com/soft-matter/pims_nd2/tarball/0.3", packages=['pims_nd2'], include_package_data=True, platforms=[ @@ -23,6 +30,6 @@ def read(fname): 'Operating System :: Microsoft :: Windows :: Windows Vista', 'Operating System :: POSIX :: Linux', ], - long_description=read('README.md')) + long_description=descr) setup(**setup_parameters)