https://github.com/python/cpython/commit/7ac933e2609b2ef9b08ccf9c815b682b0e1ede2a
commit: 7ac933e2609b2ef9b08ccf9c815b682b0e1ede2a
branch: main
author: Inada Naoki <songofaca...@gmail.com>
committer: methane <songofaca...@gmail.com>
date: 2024-05-10T19:24:02+09:00
summary:

gh-118689: Doc: fix ePub build (#118690)

files:
M Doc/conf.py
M Doc/library/allos.rst
M Doc/tools/extensions/glossary_search.py
M Doc/tools/templates/layout.html

diff --git a/Doc/conf.py b/Doc/conf.py
index 86371d17ae742a..0e86de837d35d2 100644
--- a/Doc/conf.py
+++ b/Doc/conf.py
@@ -435,6 +435,10 @@
 epub_author = 'Python Documentation Authors'
 epub_publisher = 'Python Software Foundation'
 
+# index pages are not valid xhtml
+# https://github.com/sphinx-doc/sphinx/issues/12359
+epub_use_index = False
+
 # Options for the coverage checker
 # --------------------------------
 
diff --git a/Doc/library/allos.rst b/Doc/library/allos.rst
index f7105d8af8e28b..0223c1054ea5d8 100644
--- a/Doc/library/allos.rst
+++ b/Doc/library/allos.rst
@@ -16,7 +16,6 @@ but they are available on most other systems as well.  Here's 
an overview:
    io.rst
    time.rst
    argparse.rst
-   getopt.rst
    logging.rst
    logging.config.rst
    logging.handlers.rst
diff --git a/Doc/tools/extensions/glossary_search.py 
b/Doc/tools/extensions/glossary_search.py
index 59a6862ea3d3f4..232782093926f6 100644
--- a/Doc/tools/extensions/glossary_search.py
+++ b/Doc/tools/extensions/glossary_search.py
@@ -20,7 +20,7 @@
 
 
 def process_glossary_nodes(app, doctree, fromdocname):
-    if app.builder.format != 'html':
+    if app.builder.format != 'html' or app.builder.embedded:
         return
 
     terms = {}
diff --git a/Doc/tools/templates/layout.html b/Doc/tools/templates/layout.html
index 3c12b01b558f83..e931147813ae03 100644
--- a/Doc/tools/templates/layout.html
+++ b/Doc/tools/templates/layout.html
@@ -42,6 +42,7 @@
     </style>
 {{ super() }}
 
+{%- if not embedded %}
 <meta name="readthedocs-addons-api-version" content="1">
 <script type="text/javascript">
  function onSwitch(event) {
@@ -127,4 +128,5 @@
    }
  });
 </script>
+{%- endif %}
 {% endblock %}

_______________________________________________
Python-checkins mailing list -- python-checkins@python.org
To unsubscribe send an email to python-checkins-le...@python.org
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: arch...@mail-archive.com

Reply via email to