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