From 2c7929511114494350e26d7b0c790fb8ca82f605 Mon Sep 17 00:00:00 2001
From: Daw-Ran Liou <dawran6@gmail.com>
Date: Mon, 14 May 2018 13:34:23 -0400
Subject: [PATCH] Support Sphinx 1.7+

Move: from sphinx.util.compat import Directive
To: from docutils.parsers.rst import Directive
---
 docs/clickdoctools.py | 2 +-
 setup.py              | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/docs/clickdoctools.py b/docs/clickdoctools.py
index c3db195..1dd47d3 100644
--- a/docs/clickdoctools.py
+++ b/docs/clickdoctools.py
@@ -15,7 +15,7 @@ from docutils import nodes
 from docutils.statemachine import ViewList
 
 from sphinx.domains import Domain
-from sphinx.util.compat import Directive
+from docutils.parsers.rst import Directive
 
 PY2 = sys.version_info[0] == 2
 
diff --git a/setup.py b/setup.py
index b78403e..f1bcdcf 100644
--- a/setup.py
+++ b/setup.py
@@ -24,6 +24,11 @@ setup(
     maintainer_email='contact@palletsprojects.com',
     long_description=readme,
     packages=['click'],
+    extras_require={
+        'docs': [
+            'sphinx',
+        ],
+    },
     description='A simple wrapper around optparse for '
                 'powerful command line utilities.',
     license='BSD',
-- 
2.16.4

