-
-
Notifications
You must be signed in to change notification settings - Fork 453
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sage -docbuild: error building docs of single file #29651
Comments
comment:1
This fixes the problem for me. The only part I'm not happy about is silencing the warning in sphinxbuild.py, because that message could indicate a problem in some circumstances: diff --git a/src/sage_setup/docbuild/__init__.py b/src/sage_setup/docbuild/__init__.py
index 128117b960..6c4761859b 100644
--- a/src/sage_setup/docbuild/__init__.py
+++ b/src/sage_setup/docbuild/__init__.py
@@ -59,7 +59,7 @@ import sphinx.ext.intersphinx
import sage.all
from sage.misc.cachefunc import cached_method
from sage.misc.misc import sage_makedirs
-from sage.env import SAGE_DOC_SRC, SAGE_DOC, SAGE_SRC
+from sage.env import SAGE_DOC_SRC, SAGE_DOC, SAGE_SRC, DOT_SAGE
from .build_options import (LANGUAGES, SPHINXOPTS, PAPER, OMIT,
PAPEROPTS, ALLSPHINXOPTS, NUM_THREADS, WEBSITESPHINXOPTS,
@@ -1185,6 +1185,9 @@ html_title = project
html_short_title = project
htmlhelp_basename = name
+extensions.remove('multidocs')
+extensions.remove('inventory_builder')
+
latex_domain_indices = False
latex_documents = [
('index', name + '.tex', u'Documentation for {}',
diff --git a/src/sage_setup/docbuild/sphinxbuild.py b/src/sage_setup/docbuild/sphinxbuild.py
index fe7eba43b2..31fdaf4bfb 100644
--- a/src/sage_setup/docbuild/sphinxbuild.py
+++ b/src/sage_setup/docbuild/sphinxbuild.py
@@ -110,6 +110,7 @@ class SageSphinxLogger(object):
re.compile('WARNING: Any IDs not assiend for figure node'),
re.compile('WARNING: .* is not referenced'),
re.compile('WARNING: Build finished'),
+ re.compile('WARNING: unknown config value \'multidoc_first_pass\''),
)
self._useless_chatter += self._ignored_warnings
|
comment:2
Thanks! This does make (1) and (2) work for me (and (3) was already working). Do you want to make the patches into a branch (or should I)? I don't understand the docbuild system, so I don't have a suggestion for an alternative to silencing the warning (and I can't review this fix), but maybe I will before 9.2 comes out. Method (4) still doesn't work, but I don't think it really needs to be fixed. However, unless there is already some reason that a user shouldn't expect relative paths to work for the build directory, then I would suggest mentioning the need for absolute paths in the documentation (and in |
comment:3
Let me think more about the change to |
comment:5
This branch partially works for me:
|
Commit: |
comment:8
|
comment:9
Note "attempted relative import with no known parent package" |
comment:10
I can confirm that |
comment:11
Replying to @mkoeppe:
I don't know what that means. |
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:13
Maybe the module name needs to be set more intelligently if the path starts with |
comment:14
Looks like the approach of |
comment:15
Replying to @jhpalmieri:
I just wrote something like this for #30452 |
Author: John Palmieri |
Reviewer: Matthias Koeppe |
comment:17
In any case, this is already an improvement. We can improve it further on a follow-up ticket. |
Changed branch from u/jhpalmieri/single-file-docbuild to |
I tried a few different ways to build the docs of a single file, and got a few different errors. (But one of the methods works, so there is a workaround.) This is with sage 9.1.rc2 on Mac OS 10.15.3.
(1) My first attempt failed because
'DOT_SAGE' is not defined
.(2) To avoid the need for
DOT_SAGE
, I gave an explicit build path. This worked better (it made pdf files of all of the plots), but failed with anAssertionError
(and subsequentOSError
):assert app.outdir.startswith(SAGE_DOC)
:(3) To eliminate the
AssertionError
, I added a print statement to tell me the value ofSAGE_DOC
, and I used it for the build path. This worked! (The release number and author show up as "unknown" in the pdf file, but I am guessing that this is the expected behavior.)(4) To save myself some typing, I tried again with a local path for the build directory, but got
because
The directory actually did get created (but is empty). However, it seems that the local path fails because the
$MAKE
command is not running in my working directory (where I ran thesage --docbuild
command). I don't know whether this is a bug, or the expected behavior.Component: build
Author: John Palmieri
Branch/Commit:
b0310af
Reviewer: Matthias Koeppe
Issue created by migration from https://trac.sagemath.org/ticket/29651
The text was updated successfully, but these errors were encountered: