Move docs reqs back to reqs.txt 70/12570/4
authorThanh Ha <thanh.ha@linuxfoundation.org>
Thu, 13 Sep 2018 14:19:54 +0000 (10:19 -0400)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Thu, 13 Sep 2018 15:01:22 +0000 (11:01 -0400)
We actually depend on lfdocs-conf to ship Sphinx to downstream
consumers removing it from requirements.txt was a bad idea.

Move it back and use skip_install=True in coala to have it skip
installing requirements.txt in the coala testenv.

Change-Id: Ia0739405a4b68dcdb1ca509701745b6dc9828588
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
.coafile
docs/requirements.txt [deleted file]
docs_conf/conf.py
requirements.txt
tox.ini

index fe3628c..8a2fa26 100644 (file)
--- a/.coafile
+++ b/.coafile
@@ -27,7 +27,7 @@ bears = BanditBear,
     PyImportSortBear
 files = docs_conf/**.py
 known_first_party_imports = lftools
-known_third_party_imports = pytest, six
+known_third_party_imports = pytest, six, sphinx_bootstrap_theme
 pydocstyle_ignore = D203, D213, D301
 max_line_length = 120
 
diff --git a/docs/requirements.txt b/docs/requirements.txt
deleted file mode 100644 (file)
index e68bd8c..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-Sphinx~=1.7.9
-sphinx_bootstrap_theme>=0.6.2
index c27ff24..22a9da0 100644 (file)
@@ -17,9 +17,8 @@ Configure sphinx-doc through an YAML file.
 import imp
 import os.path
 
-import yaml
-
 import sphinx_bootstrap_theme
+import yaml
 
 
 def _merge_yaml(x, y):
index 35aaeb5..1dd7d05 100644 (file)
@@ -1,2 +1,4 @@
 pytest
 pyyaml
+Sphinx~=1.7.9
+sphinx_bootstrap_theme>=0.6.2
diff --git a/tox.ini b/tox.ini
index f8d9dd3..7d46d2b 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -1,5 +1,5 @@
 [tox]
-minversion = 1.6
+minversion = 1.9
 envlist =
     check-hooks,
     coala,
@@ -8,8 +8,7 @@ envlist =
 
 [testenv]
 deps =
-  -rrequirements.txt
-  -rdocs/requirements.txt
+    -rrequirements.txt
 commands =
     pytest --basetemp={envtmpdir} {posargs}
 
@@ -24,15 +23,16 @@ basepython = python3
 deps =
     coala
     coala-bears
-    Sphinx<1.5,>=1.3
     nodeenv==1.1.2
 commands =
     nodeenv -p
     npm install --global write-good
+    # Workaround for systems that do not have `skip_install` (tox>=1.9)
+    pip install Sphinx~=1.4.9
     coala --non-interactive
+skip_install=True
 
 [testenv:docs]
-deps = -rdocs/requirements.txt
 commands =
     sphinx-build -W -b html -n -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html
     echo "Generated docs available in {toxinidir}/docs/_build/html"