Skip to content

Commit 160cbce

Browse files
committed
Move Sphinx templates and extensions to their own subdirs.
1 parent 8a91c5b commit 160cbce

10 files changed

+10
-26
lines changed

Doc/conf.py

+9-25
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,18 @@
88
# that aren't pickleable (module imports are okay, they're removed automatically).
99

1010
import sys, os, time
11-
sys.path.append(os.path.abspath('tools'))
11+
sys.path.append(os.path.abspath('tools/extensions'))
1212

1313
# General configuration
1414
# ---------------------
1515

1616
extensions = ['sphinx.ext.coverage', 'sphinx.ext.doctest',
1717
'pyspecific', 'c_annotations']
18-
templates_path = ['tools']
1918

2019
# General substitutions.
2120
project = 'Python'
2221
copyright = '1990-%s, Python Software Foundation' % time.strftime('%Y')
2322

24-
# The default replacements for |version| and |release|.
25-
#
26-
# The short X.Y version.
27-
# version = '2.6'
28-
# The full version, including alpha/beta/rc tags.
29-
# release = '2.6a0'
30-
3123
# We look for the Include/patchlevel.h file in the current Python source tree
3224
# and replace the values accordingly.
3325
import patchlevel
@@ -46,19 +38,6 @@
4638
'library/xml.etree.rst',
4739
]
4840

49-
# Ignore .rst in Sphinx its self.
50-
exclude_trees = ['tools/sphinx']
51-
52-
# Relative filename of the reference count data file.
53-
refcount_file = 'data/refcounts.dat'
54-
55-
# If true, '()' will be appended to :func: etc. cross-reference text.
56-
add_function_parentheses = True
57-
58-
# If true, the current module name will be prepended to all description
59-
# unit titles (such as .. function::).
60-
add_module_names = True
61-
6241
# Require Sphinx 1.2 for build.
6342
needs_sphinx = '1.2'
6443

@@ -73,9 +52,8 @@
7352
# using the given strftime format.
7453
html_last_updated_fmt = '%b %d, %Y'
7554

76-
# If true, SmartyPants will be used to convert quotes and dashes to
77-
# typographically correct entities.
78-
html_use_smartypants = True
55+
# Path to find HTML templates.
56+
templates_path = ['tools/templates']
7957

8058
# Custom sidebar templates, filenames relative to this file.
8159
html_sidebars = {
@@ -192,3 +170,9 @@
192170
coverage_ignore_c_items = {
193171
# 'cfunction': [...]
194172
}
173+
174+
# Options for extensions
175+
# ----------------------
176+
177+
# Relative filename of the reference count data file.
178+
refcount_file = 'data/refcounts.dat'
File renamed without changes.
File renamed without changes.
File renamed without changes.

Doc/tools/suspicious.py Doc/tools/extensions/suspicious.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def init(self):
9191
self.log_file_name = os.path.join(self.outdir, 'suspicious.csv')
9292
open(self.log_file_name, 'w').close()
9393
# load database of previously ignored issues
94-
self.load_rules(os.path.join(os.path.dirname(__file__),
94+
self.load_rules(os.path.join(os.path.dirname(__file__), '..',
9595
'susp-ignored.csv'))
9696

9797
def get_outdated_docs(self):
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)