Browse Source

Merge "Follow the new PTI for document build"

Zuul 10 months ago
parent
commit
c5171adb2b
5 changed files with 14 additions and 19 deletions
  1. 1
    0
      doc/requirements.txt
  2. 12
    4
      doc/source/conf.py
  3. 0
    13
      setup.cfg
  4. 0
    1
      test-requirements.txt
  5. 1
    1
      tox.ini

+ 1
- 0
doc/requirements.txt View File

@@ -7,6 +7,7 @@ doc8>=0.6.0 # Apache-2.0
7 7
 openstackdocstheme>=1.18.1 # Apache-2.0
8 8
 reno>=2.5.0 # Apache-2.0
9 9
 sphinx!=1.6.6,!=1.6.7,>=1.6.2 # BSD
10
+sphinxcontrib-apidoc>=0.2.0  # BSD
10 11
 
11 12
 # For autodoc builds
12 13
 mock>=2.0.0 # BSD

+ 12
- 4
doc/source/conf.py View File

@@ -10,7 +10,6 @@
10 10
 # All configuration values have a default; values that are commented out
11 11
 # serve to show the default.
12 12
 
13
-from __future__ import unicode_literals
14 13
 
15 14
 import os
16 15
 import sys
@@ -37,14 +36,23 @@ sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__),
37 36
 # Add any Sphinx extension module names here, as strings. They can be
38 37
 # extensions
39 38
 # coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
40
-extensions = ['sphinx.ext.autodoc',
41
-              'sphinx.ext.todo',
39
+extensions = ['sphinx.ext.todo',
42 40
               'sphinx.ext.coverage',
43 41
               'sphinx.ext.intersphinx',
44 42
               'openstackdocstheme',
45
-              'oslo_config.sphinxconfiggen'
43
+              'oslo_config.sphinxconfiggen',
44
+              'sphinxcontrib.apidoc',
46 45
              ]
47 46
 
47
+# sphinxcontrib.apidoc options
48
+apidoc_module_dir = '../../keystonemiddleware'
49
+apidoc_output_dir = 'api'
50
+apidoc_excluded_paths = [
51
+    'tests/*',
52
+    'tests',
53
+    'test']
54
+apidoc_separate_modules = True
55
+
48 56
 config_generator_config_file = '../../config-generator/keystonemiddleware.conf'
49 57
 sample_config_basename = '_static/keystonemiddleware'
50 58
 

+ 0
- 13
setup.cfg View File

@@ -40,19 +40,6 @@ paste.filter_factory =
40 40
     ec2_token = keystonemiddleware.ec2_token:filter_factory
41 41
     s3_token = keystonemiddleware.s3_token:filter_factory
42 42
 
43
-[build_sphinx]
44
-source-dir = doc/source
45
-build-dir = doc/build
46
-all_files = 1
47
-warning-is-error = 1
48
-
49
-[pbr]
50
-autodoc_tree_index_modules = True
51
-autodoc_tree_excludes = setup.py
52
-
53
-[upload_sphinx]
54
-upload-dir = doc/build/html
55
-
56 43
 [compile_catalog]
57 44
 directory = keystonemiddleware/locale
58 45
 domain = keystonemiddleware

+ 0
- 1
test-requirements.txt View File

@@ -10,7 +10,6 @@ cryptography>=2.1 # BSD/Apache-2.0
10 10
 fixtures>=3.0.0 # Apache-2.0/BSD
11 11
 mock>=2.0.0 # BSD
12 12
 oslotest>=3.2.0 # Apache-2.0
13
-reno>=2.5.0 # Apache-2.0
14 13
 requests-mock>=1.2.0 # Apache-2.0
15 14
 stevedore>=1.20.0 # Apache-2.0
16 15
 stestr  # Apache-2.0

+ 1
- 1
tox.ini View File

@@ -61,7 +61,7 @@ exclude = .venv,.tox,dist,doc,*egg,build
61 61
 deps = -r{toxinidir}/doc/requirements.txt
62 62
 commands=
63 63
     doc8 doc/source
64
-    python setup.py build_sphinx
64
+    sphinx-build -W -b html doc/source doc/build/html
65 65
 
66 66
 [testenv:releasenotes]
67 67
 deps = -r{toxinidir}/doc/requirements.txt

Loading…
Cancel
Save