From 55633c19cf43da82b73bc718dc913f851c13f5c5 Mon Sep 17 00:00:00 2001 From: Ahmed Masud Date: Sat, 5 Oct 2019 19:06:41 -0400 Subject: [PATCH] Fixed sphinx version in requirements.txt (#52) * Updated supported sphinx version to 2.2 * Fixed CLICK_VERSION to semantic versioning semantic versioning can hae additional labels after . e.g. prerelease. the previous way of splitting CLICK_VERSION would not work when testing against newer development versions of click. This patch takes care of that. --- requirements.txt | 2 +- sphinx_click/ext.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index db1ff2e..5cc92ab 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,2 @@ pbr>=2.0 -sphinx>=1.5,<2.2 +sphinx>=1.5,<2.3 diff --git a/sphinx_click/ext.py b/sphinx_click/ext.py index 13bde8d..d3064ff 100644 --- a/sphinx_click/ext.py +++ b/sphinx_click/ext.py @@ -7,7 +7,7 @@ from sphinx.util import logging LOG = logging.getLogger(__name__) -CLICK_VERSION = tuple(int(x) for x in click.__version__.split('.')) +CLICK_VERSION = tuple(int(x) for x in click.__version__.split('.')[0:2]) def _indent(text, level=1):