sageWithDoc: 10.6 -> 10.7 (#446708)
This commit is contained in:
@@ -1,40 +1,8 @@
|
||||
diff --git a/src/sage_docbuild/builders.py b/src/sage_docbuild/builders.py
|
||||
index ab39d93c280..e6501c083d5 100644
|
||||
index 91035a01f1c..24f3d0c7c12 100644
|
||||
--- a/src/sage_docbuild/builders.py
|
||||
+++ b/src/sage_docbuild/builders.py
|
||||
@@ -106,31 +106,6 @@ def builder_helper(type):
|
||||
"""
|
||||
Return a function which builds the documentation for
|
||||
output type ``type``.
|
||||
-
|
||||
- TESTS:
|
||||
-
|
||||
- Check that :issue:`25161` has been resolved::
|
||||
-
|
||||
- sage: from sage_docbuild.builders import DocBuilder
|
||||
- sage: from sage_docbuild.__main__ import setup_parser
|
||||
- sage: DocBuilder._options = setup_parser().parse_args([]) # builder_helper needs _options to be set
|
||||
-
|
||||
- sage: import sage_docbuild.sphinxbuild
|
||||
- sage: def raiseBaseException():
|
||||
- ....: raise BaseException("abort pool operation")
|
||||
- sage: original_runsphinx, sage_docbuild.sphinxbuild.runsphinx = sage_docbuild.sphinxbuild.runsphinx, raiseBaseException
|
||||
-
|
||||
- sage: from sage.misc.temporary_file import tmp_dir
|
||||
- sage: os.environ['SAGE_DOC'] = tmp_dir()
|
||||
- sage: sage.env.var('SAGE_DOC') # random
|
||||
- sage: from sage_docbuild.builders import builder_helper, build_ref_doc
|
||||
- sage: from sage_docbuild.builders import _build_many as build_many
|
||||
- sage: helper = builder_helper("html")
|
||||
- sage: try: # optional - sagemath_doc_html
|
||||
- ....: build_many(build_ref_doc, [("docname", "en", "html", {})])
|
||||
- ....: except Exception as E:
|
||||
- ....: "Non-exception during docbuild: abort pool operation" in str(E)
|
||||
- True
|
||||
"""
|
||||
def f(self, *args, **kwds):
|
||||
output_dir = self._output_dir(type)
|
||||
@@ -157,10 +132,9 @@ def builder_helper(type):
|
||||
@@ -130,10 +130,9 @@ def builder_helper(type):
|
||||
logger.debug(build_command)
|
||||
|
||||
# Run Sphinx with Sage's special logger
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
stdenv,
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
fetchpatch2,
|
||||
fetchurl,
|
||||
}:
|
||||
@@ -13,14 +12,14 @@
|
||||
# all get the same sources with the same patches applied.
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "10.6";
|
||||
version = "10.7";
|
||||
pname = "sage-src";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "sagemath";
|
||||
repo = "sage";
|
||||
rev = version;
|
||||
hash = "sha256-ZDYFq2lJXjnADFdX6y7sskaF0rkT5EIcdN8/bs00TlQ=";
|
||||
hash = "sha256-nYlBmKQ9TD5EAVvNwo8YzqAd5IUCpTU3kBTqUH21IxQ=";
|
||||
};
|
||||
|
||||
# contains essential files (e.g., setup.cfg) generated by the bootstrap script.
|
||||
@@ -28,8 +27,8 @@ stdenv.mkDerivation rec {
|
||||
configure-src = fetchurl {
|
||||
# the hash below is the tagged commit's _parent_. it can also be found by looking for
|
||||
# the "configure" asset at https://github.com/sagemath/sage/releases/tag/${version}
|
||||
url = "mirror://sageupstream/configure/configure-10741006a4794b7db82942db55b97033d5905431.tar.gz";
|
||||
hash = "sha256-7LqY+vwBlyukDfcRtuR99vpC3hcBo8WRUuJjiFFq9xk=";
|
||||
url = "mirror://sageupstream/configure/configure-858268b40010e5ed6da13488ad0f52cda4d1f70e.tar.gz";
|
||||
hash = "sha256-TsVX+wUWr+keCXmGQp1OHGXgNc7luajyGxfTwduSEtc=";
|
||||
};
|
||||
|
||||
# Patches needed because of particularities of nix or the way this is packaged.
|
||||
@@ -60,6 +59,13 @@ stdenv.mkDerivation rec {
|
||||
# compile libs/gap/element.pyx with -O1
|
||||
# a more conservative version of https://github.com/sagemath/sage/pull/37951
|
||||
./patches/gap-element-crash.patch
|
||||
|
||||
# https://github.com/sagemath/sage/pull/40895, positively reviewed
|
||||
(fetchpatch2 {
|
||||
name = "doctest-absolute-path.patch";
|
||||
url = "https://github.com/sagemath/sage/commit/3de32dccd2e32e5452ca3adf5bd63cbacb64ba9d.patch?full_index=1";
|
||||
hash = "sha256-rp+9d8Y6kifWzufE07GWU68txPn//w7uMn4LcpITaBs=";
|
||||
})
|
||||
];
|
||||
|
||||
# Patches needed because of package updates. We could just pin the versions of
|
||||
@@ -69,33 +75,6 @@ stdenv.mkDerivation rec {
|
||||
# should come from or be proposed to upstream. This list will probably never
|
||||
# be empty since dependencies update all the time.
|
||||
packageUpgradePatches = [
|
||||
# https://github.com/sagemath/sage/pull/39737, positively reviewed
|
||||
(fetchpatch {
|
||||
name = "sphinx-8.2-update.patch";
|
||||
url = "https://github.com/sagemath/sage/pull/39737/commits/4e485497fb5e20a056ffd2178360b88f482447d8.patch";
|
||||
hash = "sha256-oIcFeol0SW5dE/iE6mbYyas3kXIjOwsG1k+h99R94x8=";
|
||||
})
|
||||
|
||||
# https://github.com/sagemath/sage/pull/40285, landed in 10.7.beta7
|
||||
(fetchpatch2 {
|
||||
name = "scipy-1.16-update.patch";
|
||||
url = "https://github.com/sagemath/sage/commit/d0cbe9d353722580f98a327694f1a361c9b83ccd.patch?full_index=1";
|
||||
hash = "sha256-uV2nttxCKDsNqMf1O+lUmuoiDrx7/CfiS00JBb9kiM8=";
|
||||
})
|
||||
|
||||
# https://github.com/sagemath/sage/pull/40156, landed in 10.7.beta5
|
||||
(fetchpatch2 {
|
||||
name = "cython-3.1-update.patch";
|
||||
url = "https://github.com/sagemath/sage/commit/5ea8db28977ec113aec3c4c4b208d1783e3937a7.patch?full_index=1";
|
||||
hash = "sha256-5DPPxMuidPpVHrjK8j0UVZzuwiVy9vQzFd6hBYwNAok=";
|
||||
})
|
||||
|
||||
# https://github.com/sagemath/sage/pull/40175, landed in 10.7.beta8
|
||||
(fetchpatch2 {
|
||||
name = "rpy2-3.6-update.patch";
|
||||
url = "https://github.com/sagemath/sage/commit/db2d8db99d9a7dfa1972d534ecd89e3d2ba5c55b.patch?full_index=1";
|
||||
hash = "sha256-6Bk0uGlKFsiDsgv+ljMC1YnmAT+g+he6aFNkpvw2on0=";
|
||||
})
|
||||
];
|
||||
|
||||
patches = nixPatches ++ bugfixPatches ++ packageUpgradePatches;
|
||||
|
||||
@@ -20,8 +20,9 @@ stdenv.mkDerivation rec {
|
||||
chmod -R 755 "$SAGE_DOC_SRC_OVERRIDE"
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
export SAGE_NUM_THREADS="$NIX_BUILD_CORES"
|
||||
preBuild = ''
|
||||
export SAGE_ROOT="${sage-with-env.env.lib.src}"
|
||||
export PATH="${sage-with-env}/bin:$PATH"
|
||||
export HOME="$TMPDIR/sage_home"
|
||||
mkdir -p "$HOME"
|
||||
|
||||
@@ -31,12 +32,14 @@ stdenv.mkDerivation rec {
|
||||
# jupyter-sphinx calls the sagemath jupyter kernel during docbuild
|
||||
export JUPYTER_PATH=${jupyter-kernel-specs}
|
||||
|
||||
${sage-with-env}/bin/sage --docbuild \
|
||||
--mathjax \
|
||||
--no-pdf-links \
|
||||
all html
|
||||
# the Makefile tries to guess SAGE_DOC, but in a buggy way (changed in 10.8)
|
||||
export SAGE_DOC="$SAGE_DOC_OVERRIDE"
|
||||
|
||||
cd docsrc
|
||||
'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
installPhase = ''
|
||||
cd "$SAGE_DOC_OVERRIDE"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user