|
18 | 18 | sys.path.append(os.path.abspath('cpython/Doc/tools/extensions'))
|
19 | 19 | sys.path.append(os.path.abspath('cpython/Doc/includes'))
|
20 | 20 |
|
21 |
| -# General configuration |
22 |
| -# --------------------- |
23 |
| - |
24 |
| -extensions = ['sphinx.ext.coverage', 'sphinx.ext.doctest', |
25 |
| - 'pyspecific', 'c_annotations', 'escape4chm'] |
| 21 | +# Import all the Sphinx settings from cpython |
| 22 | +sys.path.append(os.path.abspath('cpython/Doc')) |
| 23 | +from conf import * |
26 | 24 |
|
| 25 | +release = version = '3.7.7' |
27 | 26 |
|
28 | 27 | project = 'Python en Español'
|
29 | 28 | copyright = '2001-%s, Python Software Foundation' % time.strftime('%Y')
|
30 | 29 |
|
31 |
| -release = version = '3.7.7' |
32 |
| - |
33 |
| -# There are two options for replacing |today|: either, you set today to some |
34 |
| -# non-false value, then it is used: |
35 |
| -today = '' |
36 |
| -# Else, today_fmt is used as the format for a strftime call. |
37 |
| -today_fmt = '%B %d, %Y' |
38 |
| - |
39 |
| -# By default, highlight as Python 3. |
40 |
| -highlight_language = 'python3' |
41 |
| - |
42 |
| -# Minimum version of sphinx required |
43 |
| -needs_sphinx = '1.8' |
44 |
| - |
45 |
| -# Ignore any .rst files in the venv/ directory. |
46 |
| -exclude_patterns = ['venv/*', 'README.rst'] |
47 |
| - |
48 |
| -# Avoid a warning with Sphinx >= 2.0 |
49 |
| -master_doc = 'contents' |
50 |
| - |
51 |
| -# Use our custom theme. |
52 |
| -html_theme = 'python_docs_theme' |
53 | 30 | html_theme_path = ['cpython/Doc/tools']
|
54 |
| -html_theme_options = { |
55 |
| - 'collapsiblesidebar': True, |
56 |
| - 'issues_url': 'https://docs.python.org/3/bugs.html', |
57 |
| - 'root_include_title': False # We use the version switcher instead. |
58 |
| -} |
59 |
| - |
60 |
| -# Short title used e.g. for <title> HTML tags. |
61 |
| -html_short_title = '%s Documentation' % release |
62 |
| - |
63 |
| -# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, |
64 |
| -# using the given strftime format. |
65 |
| -html_last_updated_fmt = '%b %d, %Y' |
66 |
| - |
67 |
| -# Path to find HTML templates. |
68 | 31 | templates_path = ['cpython/Doc/tools/templates']
|
69 |
| - |
70 |
| -# Custom sidebar templates, filenames relative to this file. |
71 |
| -html_sidebars = { |
72 |
| - # Defaults taken from http://www.sphinx-doc.org/en/stable/config.html#confval-html_sidebars |
73 |
| - # Removes the quick search block |
74 |
| - '**': ['localtoc.html', 'relations.html', 'customsourcelink.html'], |
75 |
| - 'index': ['indexsidebar.html'], |
76 |
| -} |
77 |
| - |
78 |
| -# Additional templates that should be rendered to pages. |
79 |
| -html_additional_pages = { |
80 |
| - 'download': 'download.html', |
81 |
| - 'index': 'indexcontent.html', |
82 |
| -} |
83 |
| - |
84 |
| -# Output an OpenSearch description file. |
85 |
| -html_use_opensearch = 'https://docs.python.org/' + version |
86 |
| - |
87 |
| -# Additional static files. |
88 | 32 | html_static_path = ['cpython/Doc/tools/static']
|
89 | 33 |
|
90 |
| -# Output file base name for HTML help builder. |
91 |
| -htmlhelp_basename = 'python' + release.replace('.', '') |
92 |
| - |
93 |
| -# Split the index |
94 |
| -html_split_index = True |
95 |
| - |
96 |
| -# Relative filename of the reference count data file. |
97 |
| -refcount_file = 'data/refcounts.dat' |
98 |
| - |
99 |
| - |
100 | 34 | os.system('mkdir -p cpython/locales/es/')
|
101 | 35 | os.system('ln -nfs `pwd` cpython/locales/es/LC_MESSAGES')
|
102 | 36 |
|
103 | 37 | gettext_compact = False
|
104 | 38 | locale_dirs = ['../locales', 'cpython/locales'] # relative to the sourcedir
|
105 | 39 |
|
106 |
| - |
107 | 40 | def setup(app):
|
108 | 41 | # Change the sourcedir programmatically because Read the Docs always call it with `.`
|
109 | 42 | app.srcdir = 'cpython/Doc'
|
0 commit comments