Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
micropython
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
card10
micropython
Commits
275a0f25
Commit
275a0f25
authored
9 years ago
by
Paul Sokolovsky
Browse files
Options
Downloads
Patches
Plain Diff
docs: Fix readthedocs build by updating Latex params.
parent
ee7b8f32
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/conf.py
+25
-25
25 additions, 25 deletions
docs/conf.py
with
25 additions
and
25 deletions
docs/conf.py
+
25
−
25
View file @
275a0f25
...
@@ -21,6 +21,29 @@ import os
...
@@ -21,6 +21,29 @@ import os
# documentation root, use os.path.abspath to make it absolute, like shown here.
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.insert(0, os.path.abspath('.'))
#sys.path.insert(0, os.path.abspath('.'))
# Work out the port to generate the docs for
from
collections
import
OrderedDict
micropy_port
=
os
.
getenv
(
'
MICROPY_PORT
'
)
or
'
pyboard
'
tags
.
add
(
'
port_
'
+
micropy_port
)
ports
=
OrderedDict
((
(
"
unix
"
,
"
unix
"
),
(
"
pyboard
"
,
"
the pyboard
"
),
(
"
wipy
"
,
"
the WiPy
"
),
(
"
esp8266
"
,
"
esp8266
"
),
))
# The members of the html_context dict are available inside topindex.html
url_prefix
=
os
.
getenv
(
'
MICROPY_URL_PREFIX
'
)
or
'
/
'
html_context
=
{
'
port
'
:
micropy_port
,
'
port_name
'
:
ports
[
micropy_port
],
'
all_ports
'
:[(
n
,
url_prefix
+
p
)
for
p
,
n
in
ports
.
items
()],
}
# Specify a custom master document based on the port name
master_doc
=
micropy_port
+
'
_
'
+
'
index
'
# -- General configuration ------------------------------------------------
# -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
# If your documentation needs a minimal Sphinx version, state it here.
...
@@ -213,7 +236,7 @@ latex_elements = {
...
@@ -213,7 +236,7 @@ latex_elements = {
# (source start file, target name, title,
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
# author, documentclass [howto, manual, or own class]).
latex_documents
=
[
latex_documents
=
[
(
'
index
'
,
'
MicroPython.tex
'
,
'
MicroPython Documentation
'
,
(
master_doc
,
'
MicroPython.tex
'
,
'
MicroPython Documentation
'
,
'
Damien P. George
'
,
'
manual
'
),
'
Damien P. George
'
,
'
manual
'
),
]
]
...
@@ -257,7 +280,7 @@ man_pages = [
...
@@ -257,7 +280,7 @@ man_pages = [
# (source start file, target name, title, author,
# (source start file, target name, title, author,
# dir menu entry, description, category)
# dir menu entry, description, category)
texinfo_documents
=
[
texinfo_documents
=
[
(
'
index
'
,
'
MicroPython
'
,
'
MicroPython Documentation
'
,
(
master_doc
,
'
MicroPython
'
,
'
MicroPython Documentation
'
,
'
Damien P. George
'
,
'
MicroPython
'
,
'
One line description of project.
'
,
'
Damien P. George
'
,
'
MicroPython
'
,
'
One line description of project.
'
,
'
Miscellaneous
'
),
'
Miscellaneous
'
),
]
]
...
@@ -278,26 +301,6 @@ texinfo_documents = [
...
@@ -278,26 +301,6 @@ texinfo_documents = [
# Example configuration for intersphinx: refer to the Python standard library.
# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping
=
{
'
http://docs.python.org/
'
:
None
}
intersphinx_mapping
=
{
'
http://docs.python.org/
'
:
None
}
# Work out the port to generate the docs for
from
collections
import
OrderedDict
micropy_port
=
os
.
getenv
(
'
MICROPY_PORT
'
)
or
'
pyboard
'
tags
.
add
(
'
port_
'
+
micropy_port
)
ports
=
OrderedDict
((
(
"
unix
"
,
"
unix
"
),
(
"
pyboard
"
,
"
the pyboard
"
),
(
"
wipy
"
,
"
the WiPy
"
),
(
"
esp8266
"
,
"
esp8266
"
),
))
# The members of the html_context dict are available inside topindex.html
url_prefix
=
os
.
getenv
(
'
MICROPY_URL_PREFIX
'
)
or
'
/
'
html_context
=
{
'
port
'
:
micropy_port
,
'
port_name
'
:
ports
[
micropy_port
],
'
all_ports
'
:[(
n
,
url_prefix
+
p
)
for
p
,
n
in
ports
.
items
()],
}
# Append the other ports' specific folders/files to the exclude pattern
# Append the other ports' specific folders/files to the exclude pattern
exclude_patterns
.
extend
([
port
+
'
*
'
for
port
in
ports
if
port
!=
micropy_port
])
exclude_patterns
.
extend
([
port
+
'
*
'
for
port
in
ports
if
port
!=
micropy_port
])
# Exclude pyb module if the port is the WiPy
# Exclude pyb module if the port is the WiPy
...
@@ -305,6 +308,3 @@ if micropy_port == 'wipy':
...
@@ -305,6 +308,3 @@ if micropy_port == 'wipy':
exclude_patterns
.
append
(
'
library/pyb*
'
)
exclude_patterns
.
append
(
'
library/pyb*
'
)
else
:
# exclude machine
else
:
# exclude machine
exclude_patterns
.
append
(
'
library/machine*
'
)
exclude_patterns
.
append
(
'
library/machine*
'
)
# Specify a custom master document based on the port name
master_doc
=
micropy_port
+
'
_
'
+
'
index
'
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment