From ce00a069fa4472f2803a1e590efed6b480368e44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Fri, 23 Oct 2015 12:08:36 +0200 Subject: [PATCH] Added conversion for README.md to rst for PyPi --- setup.py | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 878c18b4..e8eb944d 100644 --- a/setup.py +++ b/setup.py @@ -48,6 +48,9 @@ EXTRA_REQUIRES = dict( "sphinx>=1.3", "sphinxcontrib-httpdomain", "sphinx_rtd_theme" + + # PyPi upload related + "pypandoc" ], # Dependencies for developing OctoPrint plugins @@ -56,6 +59,9 @@ EXTRA_REQUIRES = dict( ] ) +# Additional requirements for setup +SETUP_REQUIRES = [] + # Dependency links for any of the aforementioned dependencies DEPENDENCY_LINKS = [] @@ -82,8 +88,22 @@ def params(): version = versioneer.get_version() cmdclass = get_cmdclass() - description = "A responsive web interface for 3D printers" + description = "A snappy web interface for 3D printers" long_description = open("README.md").read() + + install_requires = INSTALL_REQUIRES + extras_require = EXTRA_REQUIRES + dependency_links = DEPENDENCY_LINKS + setup_requires = SETUP_REQUIRES + + try: + import pypandoc + setup_requires += ["setuptools-markdown"] + long_description_markdown_filename = "README.md" + del pypandoc + except: + pass + classifiers = [ "Development Status :: 4 - Beta", "Environment :: Web Environment", @@ -118,9 +138,6 @@ def params(): include_package_data = True zip_safe = False - install_requires = INSTALL_REQUIRES - extras_require = EXTRA_REQUIRES - dependency_links = DEPENDENCY_LINKS if os.environ.get('READTHEDOCS', None) == 'True': # we can't tell read the docs to please perform a pip install -e .[develop], so we help