- Notifications
You must be signed in to change notification settings - Fork395
Build on Read the Docs#24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
Show all changes
17 commits Select commitHold shift + click to select a range
fe3249b
Build on Read the Docs
humitos98633b2
Path to conf.py
humitos8a35ff3
Make version a string
humitos028a81e
Submodule 3.7
humitos9914c62
Create locales directories
humitosaf6e79f
How I do create the submodule pinned to a commit
humitos582dfcf
refcount data path
humitos90e146b
Add some help to the conf.py file
humitose323a8f
Locale Sphinx configs
humitos68151c5
Make the build to use the proper sourcedir
humitos069fdfc
Example of running with sphinx-build
humitosbc125aa
Correct Python version
humitos7822224
Locale is relative to sourcedir
humitos6ad97e8
Without this path the index is not translated
humitos5dd76e9
Reduce the overrides and re-use as much as possible
humitos62b4db9
Small doc change
humitos309ef1f
version != release
humitosFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
1 change: 1 addition & 0 deletions.gitignore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
*.mo | ||
/_build/ |
5 changes: 5 additions & 0 deletions.gitmodules
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[submodule "cpython"] | ||
path = cpython | ||
url = https://github.com/python/cpython.git | ||
branch = 3.7 | ||
shallow = true |
19 changes: 19 additions & 0 deletions.readthedocs.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# .readthedocs.yml | ||
# Read the Docs configuration file | ||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details | ||
# Required | ||
version: 2 | ||
# Build documentation in the docs/ directory with Sphinx | ||
sphinx: | ||
configuration: conf.py | ||
# Optionally set the version of Python and requirements required to build your docs | ||
python: | ||
version: 3.7 | ||
install: | ||
- requirements: requirements.txt | ||
submodules: | ||
include: all |
42 changes: 42 additions & 0 deletionsconf.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Sphinx configuration file. | ||
# | ||
# - import original configurations from cpython/Doc/conf.py | ||
# - append the path considering the cpython submodule is at ./cpython | ||
# - create the symbolic links under ./cpython/locale/es/LC_MESSAGES | ||
# - make the build to work under Read the Docs | ||
# | ||
# The git submodule was created using this Stack Overflow answer | ||
# to fetch only the commit that I needed and avoid clonning the whole history | ||
# https://stackoverflow.com/a/27445058 | ||
# | ||
# This can be built locally using `sphinx-build` by running | ||
# | ||
# $ sphinx-build -b html -n -d _build/doctrees -D language=es . _build/html | ||
import sys, os, time | ||
sys.path.append(os.path.abspath('cpython/Doc/tools/extensions')) | ||
sys.path.append(os.path.abspath('cpython/Doc/includes')) | ||
# Import all the Sphinx settings from cpython | ||
sys.path.append(os.path.abspath('cpython/Doc')) | ||
from conf import * | ||
version = '3.7' | ||
release = '3.7.7' | ||
project = 'Python en Español' | ||
copyright = '2001-%s, Python Software Foundation' % time.strftime('%Y') | ||
html_theme_path = ['cpython/Doc/tools'] | ||
templates_path = ['cpython/Doc/tools/templates'] | ||
html_static_path = ['cpython/Doc/tools/static'] | ||
os.system('mkdir -p cpython/locales/es/') | ||
os.system('ln -nfs `pwd` cpython/locales/es/LC_MESSAGES') | ||
gettext_compact = False | ||
locale_dirs = ['../locales', 'cpython/locales'] # relative to the sourcedir | ||
def setup(app): | ||
# Change the sourcedir programmatically because Read the Docs always call it with `.` | ||
app.srcdir = 'cpython/Doc' |
1 change: 1 addition & 0 deletionscpython
4 changes: 4 additions & 0 deletionsrequirements.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Sphinx==2.2.0 | ||
setuptools | ||
blurb | ||
python-docs-theme |
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.