Skip to content

Commit fe3249b

Browse files
committed
Build on Read the Docs
1 parent 9df4d9b commit fe3249b

File tree

4 files changed

+112
-0
lines changed

4 files changed

+112
-0
lines changed

.gitmodules

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[submodule "cpython"]
2+
path = cpython
3+
url = https://github.com/python/cpython.git
4+
branch = 3.7
5+
shallow = true

.readthedocs.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# .readthedocs.yml
2+
# Read the Docs configuration file
3+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4+
5+
# Required
6+
version: 2
7+
8+
# Build documentation in the docs/ directory with Sphinx
9+
sphinx:
10+
configuration: cpython/Doc/conf.py
11+
12+
# Optionally set the version of Python and requirements required to build your docs
13+
python:
14+
version: 3.7
15+
install:
16+
- requirements: requirements.txt
17+
18+
submodules:
19+
include: all

conf.py

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
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')

requirements.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Sphinx==2.2.0
2+
setuptools
3+
blurb
4+
python-docs-theme

0 commit comments

Comments
 (0)