From 383d3eebe1749e8bc2718007d5155351d2d423be Mon Sep 17 00:00:00 2001 From: Thomas Bechtold Date: Thu, 29 Mar 2018 14:28:17 +0200 Subject: [PATCH] Reduce need for openstack specific requirements - openstackdocstheme is only needed for docs builds. Move this and some missing doc-related requirements into the current convention of doc/requirements.txt so they are not installed when just using the library. - oslotest is not used directly. It only helped pick up self.useFixture from testtools. Since nothing else is needed, just use testtools directly. Change-Id: Ibfda6fbe91deaa846b62732c38eef93c393c926f --- doc/requirements.txt | 7 +++++++ sphinx_feature_classification/tests/base.py | 4 ++-- test-requirements.txt | 5 ----- tox.ini | 5 +++++ 4 files changed, 14 insertions(+), 7 deletions(-) create mode 100644 doc/requirements.txt diff --git a/doc/requirements.txt b/doc/requirements.txt new file mode 100644 index 0000000..b6fb5ea --- /dev/null +++ b/doc/requirements.txt @@ -0,0 +1,7 @@ +# The order of packages is significant, because pip processes them in the order +# of appearance. Changing the order has an impact on the overall integration +# process, which may cause wedges in the gate later. + +openstackdocstheme>=2.2.4 # Apache-2.0 +reno>=3.1.0 # Apache-2.0 +sphinx>=2.0.0,!=2.1.0 # BSD diff --git a/sphinx_feature_classification/tests/base.py b/sphinx_feature_classification/tests/base.py index 1c30cdb..be940e5 100644 --- a/sphinx_feature_classification/tests/base.py +++ b/sphinx_feature_classification/tests/base.py @@ -15,9 +15,9 @@ # License for the specific language governing permissions and limitations # under the License. -from oslotest import base +import testtools -class TestCase(base.BaseTestCase): +class TestCase(testtools.TestCase): """Test case base class for all unit tests.""" diff --git a/test-requirements.txt b/test-requirements.txt index 01ef731..4e57eee 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -4,13 +4,8 @@ hacking>=3.0,<3.1.0 # Apache-2.0 coverage>=4.0,!=4.4 # Apache-2.0 -openstackdocstheme>=2.2.1 # Apache-2.0 -oslotest>=1.10.0 # Apache-2.0 ddt>=1.0.1 # MIT python-subunit>=0.0.18 # Apache-2.0/BSD sphinx>=2.0.0,!=2.1.0 # BSD testrepository>=0.0.18 # Apache-2.0/BSD testtools>=1.4.0 # MIT - -# releasenotes -reno>=3.1.0 # Apache-2.0 diff --git a/tox.ini b/tox.ini index bec94e5..6d3c604 100644 --- a/tox.ini +++ b/tox.ini @@ -16,6 +16,7 @@ setenv = deps = -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} -r{toxinidir}/test-requirements.txt + commands = python setup.py test --slowest --testr-args='{posargs}' [testenv:pep8] @@ -28,10 +29,14 @@ commands = {posargs} commands = python setup.py test --coverage --testr-args='{posargs}' [testenv:docs] +deps = + -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} + -r{toxinidir}/doc/requirements.txt commands = sphinx-build -W --keep-going -b html -d doc/build/doctrees doc/source doc/build/html [testenv:releasenotes] +deps = {[testenv:docs]deps} commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html