From b2c0145eaf5b1c1d82675ecfea3147ab7681b625 Mon Sep 17 00:00:00 2001 From: Tatu Aalto Date: Mon, 8 Aug 2016 16:20:52 +0300 Subject: [PATCH] Fixes #257 by removing the docutils dependency The docutils is only needed for Selenium2Library development, therefore removed the dependency from setup.py. Also added meaningfull error message to development tools, if the docutils is not installed. --- doc/buildhtml.py | 17 ++++++++++------- setup.py | 3 +-- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/doc/buildhtml.py b/doc/buildhtml.py index 5c5db1ead..42efbfe5e 100644 --- a/doc/buildhtml.py +++ b/doc/buildhtml.py @@ -26,13 +26,16 @@ import os.path import copy from fnmatch import fnmatch -import docutils -from docutils import ApplicationError -from docutils import core, frontend, utils -from docutils.error_reporting import ErrorOutput, ErrorString -from docutils.parsers import rst -from docutils.readers import standalone, pep -from docutils.writers import html4css1, pep_html +try: + import docutils + from docutils import ApplicationError + from docutils import core, frontend, utils + from docutils.error_reporting import ErrorOutput, ErrorString + from docutils.parsers import rst + from docutils.readers import standalone, pep + from docutils.writers import html4css1, pep_html +except ImportError: + raise ImportError('Importing `docutils` failed. Install it with `pip install docutils`.') usage = '%prog [options] [ ...]' diff --git a/setup.py b/setup.py index 3b58879c9..ec5943478 100755 --- a/setup.py +++ b/setup.py @@ -35,8 +35,7 @@ install_requires = [ 'decorator >= 3.3.2', 'selenium >= 2.32.0', - 'robotframework >= 2.6.0', - 'docutils >= 0.8.1' + 'robotframework >= 2.6.0' ], py_modules=['ez_setup'], package_dir = {'' : 'src'},