Closed mkoeppe closed 2 years ago
Branch pushed to git repo; I updated commit sha1. New commits:
28cf775 | src/bin/sage-runtests (_get_optional_defaults): No need to include sagemath_doc_html here |
Could you push the change from comment:33 to the ticket please?
Changed branch from u/mkoeppe/__configure___disable_doc to u/jhpalmieri/__configure___disable_doc
Replying to @jhpalmieri:
Should we expect doctests to pass with
./configure --disable-doc
? I getsrc/sage/misc/sagedoc.py # 8 doctests failed [...]
Not sure what to do with these ones. What's happening here is that sage.misc.sagedoc.detex
has a run-time dependency on Sphinx.
New commits:
10de6fd | trac 32759: doctest sage_setup and sage_docbuild conditionally |
Changed branch from u/jhpalmieri/__configure___disable_doc to u/mkoeppe/__configure___disable_doc
Replying to @mkoeppe:
Yes, I think it should be autodetected already because
sagemath_doc_html
is just an installed package
Actually, at the moment this is not true because sage.doctest.control
only looks at the optional packages.
New commits:
4213f8a | sage.misc.sagedoc: Do not fail if sphinx cannot be imported |
What mechanism adds sage.geometry.polyhedron
and sage_spkg
to the list of tags?
It's happening in the lines of code in the middle of which I have just inserted a test for sphinx
In #32174 I am hoping to unify all that
Branch pushed to git repo; I updated commit sha1. New commits:
7d26e21 | sage.features.sagemath.sagemath_doc_html: New |
Branch pushed to git repo; I updated commit sha1. New commits:
bb1626a | sage.features.sagemath.sagemath_doc_html: Fixup |
Branch pushed to git repo; I updated commit sha1. New commits:
a24c3bd | src/sage/misc/sagedoc.py: Mark some doctests # optional - sphinx |
Branch pushed to git repo; I updated commit sha1. New commits:
3e9770b | sage.features.StaticFile: Accept directories too |
Changed author from Matthias Koeppe to Matthias Koeppe, John Palmieri
By the way, this fails:
make distclean
./configure --disable-doc
make
make doc-html
I think the error boils down to
[reference] intersphinx inventory '/Users/palmieri/Desktop/Sage/sage_builds/TESTING/sage-9.5.beta5/local/share/doc/pplpy/objects.inv' not fetchable due to <class 'FileNotFoundError'>: [Errno 2] No such file or directory: '/Users/palmieri/Desktop/Sage/sage_builds/TESTING/sage-9.5.beta5/local/share/doc/pplpy/objects.inv'
The problem is that pplpy
doesn't build its documentation the first time, and then it doesn't get rebuilt when make doc-html
is run. I don't know how to fix this.
With make distclean && ./configure && make ptestlong
, I get two doctest failures:
File "src/sage/all.py", line 31, in sage.all
Failed example:
[inspect.getmodule(f).__name__ for f in frames if is_not_allowed(f)]
Expected:
[]
Got:
['pytz', 'importlib.resources']
and
File "src/sage/misc/sagedoc.py", line 31, in sage.misc.sagedoc
Failed example:
"sphinx" in sys.modules
Expected:
False
Got:
True
Replying to @jhpalmieri:
The problem is that
pplpy
doesn't build its documentation the first time, and then it doesn't get rebuilt whenmake doc-html
is run. I don't know how to fix this.
We can introduce a separate package pplpy_doc
, something that would actually also make sense for the upstream Python package.
Changed dependencies from #31356 to #31356, #32745
Branch pushed to git repo; I updated commit sha1. New commits:
f681abb | build/bin/sage-spkg: Also source sage-src-env-config so that SAGE_VENV is available |
7438449 | src/bin/sage-env: Do not skip the script if SAGE_ENV_SOURCED was set but SAGE_VENV has changed |
b07c8e3 | build/bin/sage-spkg: Remove workaround of setting of PATH in the generated package scripts |
4af9a24 | Merge #32745 |
810f26f | src/sage/misc/sagedoc.py: Test that sphinx is not imported in a fresh Sage copy |
Changed dependencies from #31356, #32745 to #31356, #32745, #32836
Branch pushed to git repo; I updated commit sha1. New commits:
7960b90 | src/sage/all.py: Update doctest |
Replying to @jhpalmieri:
With
make distclean && ./configure && make ptestlong
, I get two doctest failures:File "src/sage/all.py", line 31, in sage.all Failed example: [inspect.getmodule(f).__name__ for f in frames if is_not_allowed(f)] Expected: [] Got: ['pytz', 'importlib.resources']
I've updated this doctest for the stuff that is pulled in by the doctest framework via Sphinx.
and
File "src/sage/misc/sagedoc.py", line 31, in sage.misc.sagedoc Failed example: "sphinx" in sys.modules Expected: False Got: True
Fixed by starting a fresh interpreter for this test. Had to pull in 2 tickets that fixed issues with recursive invocation of sage
Branch pushed to git repo; I updated commit sha1. New commits:
687e5ba | src/sage/features/sagemath.py: Add doctests |
With --disable-doc
, make doc-html
goes through but ends with
touch: /var/lib/sage/installed/sagemath_doc_html-none: No such file or directory
make[2]: *** [sagemath_doc_html-SAGE_DOCS-no-deps] Error 1
For reasons I don't understand, my computer is now refusing to build the plots in the documentation — it keeps hanging in references/plotting
. After fighting with this for a while, I've given in and am resuming testing using export SAGE_DOCBUILD_OPTS=' --no-plot'
.
(Not related to this ticket: this happens with the develop
branch, too.)
Branch pushed to git repo; I updated commit sha1. New commits:
40a9760 | build/make/Makefile.in: Raise an error if installation into disabled installation tree is attempted |
Replying to @mkoeppe:
With
--disable-doc
,make doc-html
goes through but ends withtouch: /var/lib/sage/installed/sagemath_doc_html-none: No such file or directory make[2]: *** [sagemath_doc_html-SAGE_DOCS-no-deps] Error 1
Fixed now by explicitly raising a clear error.
Do we want make doc
, make doc-html
to work when --disable-doc
has been configured?
Replying to @mkoeppe:
Do we want
make doc
,make doc-html
to work when--disable-doc
has been configured?
Good question, I don't know. Should the following work? Does it work?
make distclean
./configure --disable-doc
make
./configure --enable-doc # without make distclean or similar
make doc-html
Replying to @jhpalmieri:
Replying to @mkoeppe:
Do we want
make doc
,make doc-html
to work when--disable-doc
has been configured?Good question, I don't know.
I think I would be happy if it didn't work but if there were a clear error message.
% make doc
...
Error: Sage build configured with --disable-doc, so building the documentation will not work. To fix this, ...
Replying to @jhpalmieri:
Should the following work? Does it work?
make distclean ./configure --disable-doc make ./configure --enable-doc # without make distclean or similar make doc-html
Yes, I think this works
Branch pushed to git repo; I updated commit sha1. New commits:
51f3002 | build/make/Makefile.in: Better error message when docbuild is attempted but configure --disable-doc has been used |
This switch will disable the docbuild and avoid installing its many dependencies (sphinx...).
In contrast to other packages,
pplpy
's docbuild is enabled unless explicitly disabled by settingSAGE_SPKG_INSTALL_DOCS=no
. We move it to a separate packagepplpy_doc
and make it a dependency ofsagemath_doc_html
.Split out from #31396.
We also add
argon2_cffi
andnbclient
to the packages disabled upon--disable-notebook
.Depends on #29039
CC: @tobiasdiez @dimpase @jhpalmieri @sagetrac-tmonteil
Component: build: configure
Author: Matthias Koeppe, John Palmieri
Branch/Commit:
43221d0
Reviewer: John Palmieri, Matthias Koeppe
Issue created by migration from https://trac.sagemath.org/ticket/32759