File 0001-Break-cycle-dependency-with-os-api-ref.patch of Package python-openstackdocstheme

From 8454efe607dc036b5ca0038e4c43768f0537f2ed Mon Sep 17 00:00:00 2001
From: Thomas Bechtold <tbechtold@suse.com>
Date: Sat, 5 Aug 2017 08:58:33 +0200
Subject: [PATCH] Break cycle dependency with os-api-ref

openstackdocstheme requires os-api-ref for testing, but os-api-ref requires
openstackdocstheme. To break this, make os-api-ref an optional test
requirement.

Change-Id: Ibbd01f63a516a49133cd8cdd4cf0cfe69bbaecaf
---
 setup.cfg             | 6 ++++++
 test-requirements.txt | 2 --
 tox.ini               | 1 +
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/setup.cfg b/setup.cfg
index ef7ed82..f6211fd 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -19,6 +19,12 @@ classifier =
     Programming Language :: Python :: 3.5
     Topic :: Documentation
 
+[extras]
+test =
+    # os-api-ref needs openstackdocstheme which needs os-api-ref (cycle dep)
+    # so put os-api-ref in extras to make it an optional test dependency
+    os-api-ref>=1.0.0 # Apache-2.0
+
 [global]
 setup-hooks =
     pbr.hooks.setup_hook
diff --git a/test-requirements.txt b/test-requirements.txt
index db88cd8..96347b1 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -8,5 +8,3 @@ hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
 sphinx>=1.6.2 # BSD
 
 reno!=2.3.1,>=1.8.0 # Apache-2.0
-
-os-api-ref>=1.0.0 # Apache-2.0
diff --git a/tox.ini b/tox.ini
index 0258d25..d8dec64 100644
--- a/tox.ini
+++ b/tox.ini
@@ -6,6 +6,7 @@ envlist = pep8
 usedevelop = False
 install_command = {toxinidir}/tools/tox_install.sh {env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
 deps = -r{toxinidir}/test-requirements.txt
+    .[test]
 setenv = VIRTUAL_ENV={envdir}
          BRANCH_NAME=master
          CLIENT_NAME=openstackdocstheme
-- 
2.13.3

openSUSE Build Service is sponsored by