Commit f1bd8d4a authored by Mauricio Collares's avatar Mauricio Collares
Browse files

sageWithDoc: 10.3 -> 10.4

parent 72331bfb
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -97,6 +97,7 @@ let
  # Running the tests should take something in the order of 1h.
  sage-tests = callPackage ./sage-tests.nix {
    inherit sage-with-env;
    pytest = python3.pkgs.pytest;
  };

  sage-src = callPackage ./sage-src.nix {};
+5 −5
Original line number Diff line number Diff line
diff --git a/src/sage_docbuild/builders.py b/src/sage_docbuild/builders.py
index c5be38600a..e1d15f62d3 100644
index 871cc4705a2..4b718136b91 100644
--- a/src/sage_docbuild/builders.py
+++ b/src/sage_docbuild/builders.py
@@ -105,31 +105,6 @@ def builder_helper(type):
@@ -106,31 +106,6 @@ def builder_helper(type):
     """
     Return a function which builds the documentation for
     output type ``type``.
-
-    TESTS:
-
-    Check that :trac:`25161` has been resolved::
-    Check that :issue:`25161` has been resolved::
-
-        sage: from sage_docbuild.builders import DocBuilder
-        sage: from sage_docbuild.__main__ import setup_parser
@@ -48,10 +48,10 @@ index c5be38600a..e1d15f62d3 100644
             if build_options.ABORT_ON_ERROR:
                 raise
diff --git a/src/sage_docbuild/sphinxbuild.py b/src/sage_docbuild/sphinxbuild.py
index 07c584de55..b83283a9ee 100644
index 5621fe9e456..b1b91ce7b2c 100644
--- a/src/sage_docbuild/sphinxbuild.py
+++ b/src/sage_docbuild/sphinxbuild.py
@@ -331,3 +331,8 @@ def runsphinx():
@@ -323,3 +323,8 @@ def runsphinx():
         sys.stderr = saved_stderr
         sys.stdout.flush()
         sys.stderr.flush()
+2 −0
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, sage-src
, furo
, jupyter-sphinx
, sphinx
, sphinx-copybutton
@@ -13,6 +14,7 @@ buildPythonPackage rec {
  src = sage-src;

  propagatedBuildInputs = [
    furo
    jupyter-sphinx
    sphinx
    sphinx-copybutton
+9 −57
Original line number Diff line number Diff line
@@ -11,14 +11,14 @@
# all get the same sources with the same patches applied.

stdenv.mkDerivation rec {
  version = "10.3";
  version = "10.4";
  pname = "sage-src";

  src = fetchFromGitHub {
    owner = "sagemath";
    repo = "sage";
    rev = version;
    hash = "sha256-OHtMv8t0RrP6R8XIREU+C1vpazeQLWa75wx9Mv6BN1U=";
    hash = "sha256-BDO00ZSm5lnjEuA56VsY/FZyAhoG1hkFxdIlTtBZVBA=";
  };

  # contains essential files (e.g., setup.cfg) generated by the bootstrap script.
@@ -26,8 +26,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-ab1a517b64b02bf15bbcb8d7c2d4d643bd5eff9b.tar.gz";
    hash = "sha256-pe9AxTM+gFSR4/eVfUzay+4bwjoubbYeDPc+avKjlaw=";
    url = "mirror://sageupstream/configure/configure-3c279ec5712e0fa35c5733e03e010970727d7189.tar.gz";
    hash = "sha256-3bRlgIUSIq9tDzvI+ZfEd5LMy1qHXdItEwu1say4cx4=";
  };

  # Patches needed because of particularities of nix or the way this is packaged.
@@ -62,23 +62,9 @@ stdenv.mkDerivation rec {
    # https://github.com/sagemath/sage/issues/34575
    ./patches/disable-slow-glpk-test.patch

    # https://github.com/sagemath/sage/pull/37489, landed in 10.4.beta1
    (fetchpatch {
      name = "quaternionalgebra-random-failure.patch";
      url = "https://github.com/sagemath/sage/commit/1c3f991b9d3c5778e409e5414c6cfcd456113f19.diff";
      hash = "sha256-uCXchYx26DdxTjR1k2748KCEHPnekKS2fAM7SpyhNvM=";
    })

    # 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/37886, landed in 10.4.beta7
    (fetchpatch {
      name = "remove-xcode.patch";
      url = "https://github.com/sagemath/sage/commit/8e72038b4ab24fb63c06b28f6eb43097b9ab24d6.patch";
      sha256 = "sha256-hufDJFUBa/Trn1xsVNvzb2c1wE9iyhqewj3RMjVtENA=";
    })
  ];

  # Patches needed because of package updates. We could just pin the versions of
@@ -88,45 +74,11 @@ 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/37646, landed in 10.4.beta1
    (fetchpatch {
      name = "cpp-17.patch";
      url = "https://github.com/sagemath/sage/commit/9b0a40d6cd17706db31d5ff8cdd78910409ba1c8.patch";
      sha256 = "sha256-2pJ9eH+o9O76Tsmklc/frzDOFkvPjvs2JQWCSqA+tMs=";
    })
    # https://github.com/sagemath/sage/pull/37763, landed in 10.4.beta2
    (fetchpatch {
      name = "scipy-fault-tolerance.patch";
      url = "https://github.com/sagemath/sage/commit/551139c09f26a5da96b1187c3f0dd17b8d80ef84.diff";
      hash = "sha256-PR4przrZ3ieHaW2nSY7l7VhNfrUupu9yCIrXpeyoAgg=";
    })

    # https://github.com/sagemath/sage/pull/37492, landed in 10.4.beta5
    (fetchpatch {
      name = "singular-4.3.2p14-upgrade.patch";
      url = "https://github.com/sagemath/sage/commit/a0c56816b051e97da44ac0a4e4d4f6915cf7fa0f.diff";
      sha256 = "sha256-WGMmPeBoj2LUC+2qxWuaJL89QUuGt6axGvxWkpM9LYg=";
    })

    # https://github.com/sagemath/sage/pull/37949, landed in 10.4.beta6
    (fetchpatch {
      name = "conway-polynomials-new-len.patch";
      url = "https://github.com/sagemath/sage/commit/c9f5b45179e92ea0de1e0dbe0f47464010902851.diff";
      hash = "sha256-DwN2UIX8dxfxjIiqVvMdGbIxJ7CR/Ag2XUmS5vUKFTs=";
    })

    # https://github.com/sagemath/sage/pull/37967, landed in 10.4.beta6
    (fetchpatch {
      name = "conway-polynomials-ell-point.patch";
      url = "https://github.com/sagemath/sage/commit/4e0bbaf90262a42f8ea14d5bcfed65f9d1787f54.diff";
      hash = "sha256-9gXydi1A+n7+K8YpH0PB8l/OMexhgO2F5NccU0cK+ls=";
    })

    # https://github.com/sagemath/sage/pull/38100, landed in 10.4.beta8
    # https://github.com/sagemath/sage/pull/38500, positively reviewed, to land in 10.5.beta3
    (fetchpatch {
      name = "sphinx-7.3-update.patch";
      url = "https://github.com/sagemath/sage/commit/e1b22690db42885423be5049246eb71ff52bdfef.diff";
      hash = "sha256-04KAyz8+0pJbRV8Ld0bNX1OoEx/35gIh3Nff+6n8QUU=";
      name = "cython-3.0.11-upgrade.patch";
      url = "https://patch-diff.githubusercontent.com/raw/sagemath/sage/pull/38500.diff";
      hash = "sha256-ePfH3Gy1T0UfpoVd3EZowCfy88CbE+yE2MV2itWthsA=";
    })
  ];

@@ -151,7 +103,7 @@ stdenv.mkDerivation rec {

  installPhase = ''
    cp -r . "$out"
    tar xkzf ${configure-src} -C "$out"
    tar xzf ${configure-src} -C "$out"
    rm "$out/configure"
  '';
}
+2 −0
Original line number Diff line number Diff line
{ stdenv
, lib
, pytest
, sage-with-env
, makeWrapper
, files ? null # "null" means run all tests
@@ -30,6 +31,7 @@ stdenv.mkDerivation {

  nativeBuildInputs = [ makeWrapper ];
  buildInputs = [
    pytest
    sage-with-env
  ];