]> granicus.if.org Git - python/commitdiff
Move Sphinx templates and extensions to their own subdirs.
authorGeorg Brandl <georg@python.org>
Wed, 29 Oct 2014 07:41:02 +0000 (08:41 +0100)
committerGeorg Brandl <georg@python.org>
Wed, 29 Oct 2014 07:41:02 +0000 (08:41 +0100)
Doc/conf.py
Doc/tools/extensions/c_annotations.py [moved from Doc/tools/c_annotations.py with 100% similarity]
Doc/tools/extensions/patchlevel.py [moved from Doc/tools/patchlevel.py with 100% similarity]
Doc/tools/extensions/pyspecific.py [moved from Doc/tools/pyspecific.py with 100% similarity]
Doc/tools/extensions/suspicious.py [moved from Doc/tools/suspicious.py with 99% similarity]
Doc/tools/templates/download.html [moved from Doc/tools/download.html with 100% similarity]
Doc/tools/templates/indexcontent.html [moved from Doc/tools/indexcontent.html with 100% similarity]
Doc/tools/templates/indexsidebar.html [moved from Doc/tools/indexsidebar.html with 100% similarity]
Doc/tools/templates/layout.html [moved from Doc/tools/layout.html with 100% similarity]
Doc/tools/templates/opensearch.xml [moved from Doc/tools/opensearch.xml with 100% similarity]

index 8bf52f7f81933f0c28e6a96bce6baa690a1a6a53..ca42f93f7195820b682abaf5aceb960c2ce5ae0a 100644 (file)
@@ -8,26 +8,18 @@
 # that aren't pickleable (module imports are okay, they're removed automatically).
 
 import sys, os, time
-sys.path.append(os.path.abspath('tools'))
+sys.path.append(os.path.abspath('tools/extensions'))
 
 # General configuration
 # ---------------------
 
 extensions = ['sphinx.ext.coverage', 'sphinx.ext.doctest',
               'pyspecific', 'c_annotations']
-templates_path = ['tools']
 
 # General substitutions.
 project = 'Python'
 copyright = '1990-%s, Python Software Foundation' % time.strftime('%Y')
 
-# The default replacements for |version| and |release|.
-#
-# The short X.Y version.
-# version = '2.6'
-# The full version, including alpha/beta/rc tags.
-# release = '2.6a0'
-
 # We look for the Include/patchlevel.h file in the current Python source tree
 # and replace the values accordingly.
 import patchlevel
@@ -46,19 +38,6 @@ exclude_patterns = [
     'library/xml.etree.rst',
 ]
 
-# Ignore .rst in Sphinx its self.
-exclude_trees = ['tools/sphinx']
-
-# Relative filename of the reference count data file.
-refcount_file = 'data/refcounts.dat'
-
-# If true, '()' will be appended to :func: etc. cross-reference text.
-add_function_parentheses = True
-
-# If true, the current module name will be prepended to all description
-# unit titles (such as .. function::).
-add_module_names = True
-
 # Require Sphinx 1.2 for build.
 needs_sphinx = '1.2'
 
@@ -73,9 +52,8 @@ html_theme_options = {'collapsiblesidebar': True}
 # using the given strftime format.
 html_last_updated_fmt = '%b %d, %Y'
 
-# If true, SmartyPants will be used to convert quotes and dashes to
-# typographically correct entities.
-html_use_smartypants = True
+# Path to find HTML templates.
+templates_path = ['tools/templates']
 
 # Custom sidebar templates, filenames relative to this file.
 html_sidebars = {
@@ -192,3 +170,9 @@ coverage_c_regexes = {
 coverage_ignore_c_items = {
 #    'cfunction': [...]
 }
+
+# Options for extensions
+# ----------------------
+
+# Relative filename of the reference count data file.
+refcount_file = 'data/refcounts.dat'
similarity index 99%
rename from Doc/tools/suspicious.py
rename to Doc/tools/extensions/suspicious.py
index ee877336f676a9ac64bf53d95d1cfa3f5313430c..d3ed849157f041a1febab6b0710e454a84cc4645 100644 (file)
@@ -91,7 +91,7 @@ class CheckSuspiciousMarkupBuilder(Builder):
         self.log_file_name = os.path.join(self.outdir, 'suspicious.csv')
         open(self.log_file_name, 'w').close()
         # load database of previously ignored issues
-        self.load_rules(os.path.join(os.path.dirname(__file__),
+        self.load_rules(os.path.join(os.path.dirname(__file__), '..',
                                      'susp-ignored.csv'))
 
     def get_outdated_docs(self):