Browse Source

doc: Remove local fork of apidoc

This is unnecessary as pbr has since been fixed. It was causing a broken
build as it didn't respect the '[pbr] autodoc_tree_excludes' setting in
setup.cfg.

The 'openstackclient/volume/v3' directory is an empty module containing
only an '__init__' file). Empty modules = unhappy autodoc, thus, this
module is ignored.

Change-Id: Ie355b14c14b7badccb5c25f7c17edbc5e4b3804f
tags/3.10.0
Stephen Finucane 2 years ago
parent
commit
9f471eede9
4 changed files with 8 additions and 48 deletions
  1. 0
    0
      doc/ext/__init__.py
  2. 0
    43
      doc/ext/apidoc.py
  3. 0
    5
      doc/source/conf.py
  4. 8
    0
      setup.cfg

+ 0
- 0
doc/ext/__init__.py View File


+ 0
- 43
doc/ext/apidoc.py View File

@@ -1,43 +0,0 @@
1
-# Copyright 2014 OpenStack Foundation
2
-#
3
-# Licensed under the Apache License, Version 2.0 (the "License"); you may
4
-# not use this file except in compliance with the License. You may obtain
5
-# a copy of the License at
6
-#
7
-#      http://www.apache.org/licenses/LICENSE-2.0
8
-#
9
-# Unless required by applicable law or agreed to in writing, software
10
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12
-# License for the specific language governing permissions and limitations
13
-# under the License.
14
-
15
-import os.path as path
16
-
17
-from sphinx import apidoc
18
-
19
-
20
-# NOTE(blk-u): pbr will run Sphinx multiple times when it generates
21
-# documentation. Once for each builder. To run this extension we use the
22
-# 'builder-inited' hook that fires at the beginning of a Sphinx build.
23
-# We use ``run_already`` to make sure apidocs are only generated once
24
-# even if Sphinx is run multiple times.
25
-run_already = False
26
-
27
-
28
-def run_apidoc(app):
29
-    global run_already
30
-    if run_already:
31
-        return
32
-    run_already = True
33
-
34
-    package_dir = path.abspath(path.join(app.srcdir, '..', '..',
35
-                                         'openstackclient'))
36
-    source_dir = path.join(app.srcdir, 'api')
37
-    apidoc.main(['apidoc', package_dir, '-f',
38
-                 '-H', 'openstackclient Modules',
39
-                 '-o', source_dir])
40
-
41
-
42
-def setup(app):
43
-    app.connect('builder-inited', run_apidoc)

+ 0
- 5
doc/source/conf.py View File

@@ -22,10 +22,6 @@ import pbr.version
22 22
 # documentation root, use os.path.abspath to make it absolute, like shown here.
23 23
 sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..')))
24 24
 
25
-# NOTE(blk-u): Path for our Sphinx extension, remove when
26
-# https://launchpad.net/bugs/1260495 is fixed.
27
-sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
28
-
29 25
 # -- General configuration ----------------------------------------------------
30 26
 
31 27
 # If your documentation needs a minimal Sphinx version, state it here.
@@ -37,7 +33,6 @@ extensions = ['sphinx.ext.autodoc',
37 33
               'sphinx.ext.doctest',
38 34
               'sphinx.ext.todo',
39 35
               'oslosphinx',
40
-              'ext.apidoc',
41 36
               'stevedore.sphinxext',
42 37
               ]
43 38
 

+ 8
- 0
setup.cfg View File

@@ -687,6 +687,14 @@ openstack.volume.v3 =
687 687
     volume_transfer_request_list = openstackclient.volume.v2.volume_transfer_request:ListTransferRequest
688 688
     volume_transfer_request_show = openstackclient.volume.v2.volume_transfer_request:ShowTransferRequest
689 689
 
690
+[pbr]
691
+autodoc_tree_index_modules = True
692
+autodoc_tree_excludes =
693
+    setup.py
694
+    openstackclient/volume/v3
695
+    openstackclient/tests/
696
+    openstackclient/tests/*
697
+
690 698
 [build_sphinx]
691 699
 source-dir = doc/source
692 700
 build-dir = doc/build

Loading…
Cancel
Save