diff --git a/pkgs/applications/science/math/sage/patches/sphinx-docbuild-subprocesses.patch b/pkgs/applications/science/math/sage/patches/sphinx-docbuild-subprocesses.patch index 3e7e37508ff4..2bfac780dfca 100644 --- a/pkgs/applications/science/math/sage/patches/sphinx-docbuild-subprocesses.patch +++ b/pkgs/applications/science/math/sage/patches/sphinx-docbuild-subprocesses.patch @@ -1,8 +1,8 @@ -diff --git a/src/sage_docbuild/__init__.py b/src/sage_docbuild/__init__.py -index b12d56a3c9..df9d949ed1 100644 ---- a/src/sage_docbuild/__init__.py -+++ b/src/sage_docbuild/__init__.py -@@ -88,30 +88,6 @@ def builder_helper(type): +diff --git a/src/sage_docbuild/builders.py b/src/sage_docbuild/builders.py +index c5be38600a..e1d15f62d3 100644 +--- a/src/sage_docbuild/builders.py ++++ b/src/sage_docbuild/builders.py +@@ -105,31 +105,6 @@ def builder_helper(type): """ Return a function which builds the documentation for output type ``type``. @@ -11,7 +11,8 @@ index b12d56a3c9..df9d949ed1 100644 - - Check that :trac:`25161` has been resolved:: - -- sage: from sage_docbuild import DocBuilder, setup_parser +- 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 @@ -22,8 +23,8 @@ index b12d56a3c9..df9d949ed1 100644 - 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 import builder_helper, build_ref_doc -- sage: from sage_docbuild import _build_many as build_many +- 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", {})]) @@ -33,7 +34,7 @@ index b12d56a3c9..df9d949ed1 100644 """ def f(self, *args, **kwds): output_dir = self._output_dir(type) -@@ -139,10 +115,9 @@ def builder_helper(type): +@@ -157,10 +132,9 @@ def builder_helper(type): logger.debug(build_command) # Run Sphinx with Sage's special logger @@ -44,13 +45,13 @@ index b12d56a3c9..df9d949ed1 100644 - runsphinx() + subprocess.check_call(args) except Exception: - if ABORT_ON_ERROR: + if build_options.ABORT_ON_ERROR: raise diff --git a/src/sage_docbuild/sphinxbuild.py b/src/sage_docbuild/sphinxbuild.py -index a39c99ffe9..73be823684 100644 +index 07c584de55..b83283a9ee 100644 --- a/src/sage_docbuild/sphinxbuild.py +++ b/src/sage_docbuild/sphinxbuild.py -@@ -330,3 +330,8 @@ def runsphinx(): +@@ -331,3 +331,8 @@ def runsphinx(): sys.stderr = saved_stderr sys.stdout.flush() sys.stderr.flush() diff --git a/pkgs/applications/science/math/sage/patches/tachyon-renamed-focallength.patch b/pkgs/applications/science/math/sage/patches/tachyon-renamed-focallength.patch index 5fea88309036..2f2638bc8067 100644 --- a/pkgs/applications/science/math/sage/patches/tachyon-renamed-focallength.patch +++ b/pkgs/applications/science/math/sage/patches/tachyon-renamed-focallength.patch @@ -1,25 +1,26 @@ diff --git a/src/sage/interfaces/tachyon.py b/src/sage/interfaces/tachyon.py -index 3f1dcdb538..b6fa8d1fbd 100644 +index 23671e5089..a5604a643c 100644 --- a/src/sage/interfaces/tachyon.py +++ b/src/sage/interfaces/tachyon.py -@@ -261,13 +261,13 @@ written in the sequence they are listed in the examples in this section. - The {\bf PROJECTION} keyword must be followed by one of the supported - camera projection mode identifiers {\bf PERSPECTIVE}, {\bf PERSPECTIVE_DOF}, - {\bf ORTHOGRAPHIC}, or {\bf FISHEYE}. The {\bf FISHEYE} projection mode --requires two extra parameters {\bf FOCALLENGTH} and {\bf APERTURE} -+requires two extra parameters {\bf FOCALDIST} and {\bf APERTURE} - which precede the regular camera options. +@@ -74,14 +74,14 @@ Camera projection modes + The ``PROJECTION`` keyword must be followed by one of the supported + camera projection mode identifiers ``PERSPECTIVE``, ``PERSPECTIVE_DOF``, + ``ORTHOGRAPHIC``, or ``FISHEYE``. The ``FISHEYE`` projection mode +-requires two extra parameters ``FOCALLENGTH`` and ``APERTURE`` which ++requires two extra parameters ``FOCALDIST`` and ``APERTURE`` which + precede the regular camera options. - \begin{verbatim} - Camera - projection perspective_dof -- focallength 0.75 -+ focaldist 0.75 - aperture 0.02 - Zoom 0.666667 - Aspectratio 1.000000 + :: + + Camera + projection perspective_dof +- focallength 0.75 ++ focaldist 0.75 + aperture 0.02 + Zoom 0.666667 + Aspectratio 1.000000 diff --git a/src/sage/plot/plot3d/tachyon.py b/src/sage/plot/plot3d/tachyon.py -index 08caf38d67..3e827411ce 100644 +index 88c8eba2d5..c4427dd484 100644 --- a/src/sage/plot/plot3d/tachyon.py +++ b/src/sage/plot/plot3d/tachyon.py @@ -92,7 +92,7 @@ angle, right angle):: diff --git a/pkgs/applications/science/math/sage/python-modules/sage-setup.nix b/pkgs/applications/science/math/sage/python-modules/sage-setup.nix index 50346153123d..e1c497678d50 100644 --- a/pkgs/applications/science/math/sage/python-modules/sage-setup.nix +++ b/pkgs/applications/science/math/sage/python-modules/sage-setup.nix @@ -1,6 +1,8 @@ { lib , buildPythonPackage , sage-src +, cython +, jinja2 , pkgconfig # the python module, not the pkg-config alias }: @@ -9,9 +11,9 @@ buildPythonPackage rec { pname = "sage-setup"; src = sage-src; - buildInputs = [ - pkgconfig - ]; + nativeBuildInputs = [ cython ]; + buildInputs = [ pkgconfig ]; + propagatedBuildInputs = [ jinja2 ]; preBuild = '' cd pkgs/sage-setup diff --git a/pkgs/applications/science/math/sage/sage-src.nix b/pkgs/applications/science/math/sage/sage-src.nix index 8da3c0358f45..27d0ffc6fec5 100644 --- a/pkgs/applications/science/math/sage/sage-src.nix +++ b/pkgs/applications/science/math/sage/sage-src.nix @@ -58,14 +58,14 @@ let ); in stdenv.mkDerivation rec { - version = "9.6"; + version = "9.7"; pname = "sage-src"; src = fetchFromGitHub { owner = "sagemath"; repo = "sage"; rev = version; - sha256 = "sha256-QY8Yga3hD1WhSCtA2/PVry8hHlMmC31J8jCBFtWgIU0="; + sha256 = "sha256-MYpCp18wqKwCa+tcJ7He14p1FXDlVm1vubQqQS9g3LY="; }; # Patches needed because of particularities of nix or the way this is packaged. @@ -115,21 +115,6 @@ stdenv.mkDerivation rec { # adapted from https://trac.sagemath.org/ticket/23712#comment:22 ./patches/tachyon-renamed-focallength.patch - - (fetchSageDiff { - name = "eclib-20220621-update.patch"; - base = "9.7.beta4"; - rev = "9b65d73399b33043777ba628a4d318638aec6e0e"; - sha256 = "sha256-pcb9Q9a0ROCZTyfT7TRMtgEqCom8SgrtAaZ8ATgeqVI="; - }) - - # https://trac.sagemath.org/ticket/34149 - (fetchSageDiff { - name = "sphinx-5-update.patch"; - base = "9.7.beta6"; - rev = "6f9ceb7883376a1cacda51d84ec7870121860482"; - sha256 = "sha256-prTCwBfl/wNXIkdjKLiMSe/B64wCXOjOTr4AVNiFruw="; - }) ]; patches = nixPatches ++ bugfixPatches ++ packageUpgradePatches;