summary refs log tree commit diff
path: root/pkgs/applications/science/math/sage
diff options
context:
space:
mode:
authorTimo Kaufmann <timokau@zoho.com>2019-09-30 11:13:46 +0000
committerGitHub <noreply@github.com>2019-09-30 11:13:46 +0000
commit7a7e9c1b27c11a8e2248fae3240396b7275f6429 (patch)
tree597dbdb05195d1613b8fc92791fdfd7b1e643a55 /pkgs/applications/science/math/sage
parent1be54bd0ad7fceace12b2fc43d4df363614552af (diff)
parentd9176bee708b1b4d9d60b4a4b00d35245c9a23db (diff)
downloadnixpkgs-7a7e9c1b27c11a8e2248fae3240396b7275f6429.tar
nixpkgs-7a7e9c1b27c11a8e2248fae3240396b7275f6429.tar.gz
nixpkgs-7a7e9c1b27c11a8e2248fae3240396b7275f6429.tar.bz2
nixpkgs-7a7e9c1b27c11a8e2248fae3240396b7275f6429.tar.lz
nixpkgs-7a7e9c1b27c11a8e2248fae3240396b7275f6429.tar.xz
nixpkgs-7a7e9c1b27c11a8e2248fae3240396b7275f6429.tar.zst
nixpkgs-7a7e9c1b27c11a8e2248fae3240396b7275f6429.zip
Merge pull request #64193 from timokau/sage-8.9
sage: 8.8 -> 8.9
Diffstat (limited to 'pkgs/applications/science/math/sage')
-rw-r--r--pkgs/applications/science/math/sage/patches/sphinx-docbuild-subprocesses.patch13
-rw-r--r--pkgs/applications/science/math/sage/patches/threejs-offline.patch64
-rw-r--r--pkgs/applications/science/math/sage/sage-src.nix16
-rw-r--r--pkgs/applications/science/math/sage/sagelib.nix2
4 files changed, 10 insertions, 85 deletions
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 933344aa559..56f09279622 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_setup/docbuild/__init__.py b/src/sage_setup/docbuild/__init__.py
-index 0f2700168a..60f71357d2 100644
+index 73a078e619..059125c59f 100644
 --- a/src/sage_setup/docbuild/__init__.py
 +++ b/src/sage_setup/docbuild/__init__.py
-@@ -86,26 +86,6 @@ def builder_helper(type):
+@@ -86,27 +86,6 @@ def builder_helper(type):
      """
      Returns a function which builds the documentation for
      output type ``type``.
@@ -19,7 +19,8 @@ index 0f2700168a..60f71357d2 100644
 -        ....:     raise BaseException("abort pool operation")
 -        sage: original_runsphinx, sage_setup.docbuild.sphinxbuild.runsphinx = sage_setup.docbuild.sphinxbuild.runsphinx, raiseBaseException
 -
--        sage: from sage_setup.docbuild import builder_helper, build_many, build_ref_doc
+-        sage: from sage_setup.docbuild import builder_helper, build_ref_doc
+-        sage: from sage_setup.docbuild import _build_many as build_many
 -        sage: helper = builder_helper("html")
 -        sage: try:
 -        ....:     build_many(build_ref_doc, [("docname", "en", "html", {})])
@@ -29,7 +30,7 @@ index 0f2700168a..60f71357d2 100644
      """
      def f(self, *args, **kwds):
          output_dir = self._output_dir(type)
-@@ -127,10 +107,9 @@ def builder_helper(type):
+@@ -128,10 +107,9 @@ def builder_helper(type):
          logger.debug(build_command)
  
          # Run Sphinx with Sage's special logger
@@ -43,10 +44,10 @@ index 0f2700168a..60f71357d2 100644
              if ABORT_ON_ERROR:
                  raise
 diff --git a/src/sage_setup/docbuild/sphinxbuild.py b/src/sage_setup/docbuild/sphinxbuild.py
-index 9a2fba79bc..77c8ed3592 100644
+index fe7eba43b2..463790965c 100644
 --- a/src/sage_setup/docbuild/sphinxbuild.py
 +++ b/src/sage_setup/docbuild/sphinxbuild.py
-@@ -318,3 +318,8 @@ def runsphinx():
+@@ -321,3 +321,8 @@ def runsphinx():
          sys.stderr = saved_stderr
          sys.stdout.flush()
          sys.stderr.flush()
diff --git a/pkgs/applications/science/math/sage/patches/threejs-offline.patch b/pkgs/applications/science/math/sage/patches/threejs-offline.patch
deleted file mode 100644
index 62b2f114bd6..00000000000
--- a/pkgs/applications/science/math/sage/patches/threejs-offline.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-diff --git a/build/pkgs/threejs/spkg-src b/build/pkgs/threejs/spkg-src
-index 91780d813c..254b850a24 100755
---- a/build/pkgs/threejs/spkg-src
-+++ b/build/pkgs/threejs/spkg-src
-@@ -20,9 +20,17 @@ URL3="https://raw.githubusercontent.com/mrdoob/three.js/${GIT_VERSION}/LICENSE"
- echo "Downloading $URL3"
- curl -OL "$URL3"
- 
-+# Set up directory structure
-+
-+mkdir build
-+mv three.min.js build
-+
-+mkdir -p examples/js/controls
-+mv OrbitControls.js examples/js/controls
-+
- # Package
--tar czf "$SAGE_ROOT/upstream/threejs-${GIT_VERSION}.tar.gz" 'three.min.js' 'OrbitControls.js' 'LICENSE'
--rm -rf 'three.min.js' 'OrbitControls.js' 'LICENSE'
-+tar czf "$SAGE_ROOT/upstream/threejs-${GIT_VERSION}.tar.gz" build examples 'LICENSE'
-+rm -rf 'build' 'examples' 'LICENSE'
- 
- # Update package info
- echo "${GIT_VERSION}" > 'package-version.txt'
-diff --git a/src/sage/repl/rich_output/backend_ipython.py b/src/sage/repl/rich_output/backend_ipython.py
-index 7c27d48a21..8bf4861a35 100644
---- a/src/sage/repl/rich_output/backend_ipython.py
-+++ b/src/sage/repl/rich_output/backend_ipython.py
-@@ -411,10 +411,15 @@ class BackendIPythonCommandline(BackendIPython):
-             sage: backend.threejs_offline_scripts()
-             '...<script ...</script>...'
-         """
--        from sage.env import SAGE_SHARE
-+        from sage.env import THREEJS_DIR
- 
--        scripts = [os.path.join(SAGE_SHARE, 'threejs', script)
--                   for script in ['three.min.js', 'OrbitControls.js']]
-+        scripts = [
-+            os.path.join(THREEJS_DIR, script)
-+            for script in [
-+                'build/three.min.js',
-+                'examples/js/controls/OrbitControls.js',
-+            ]
-+        ]
- 
-         if sys.platform == 'cygwin':
-             import cygwin
-@@ -594,13 +599,13 @@ class BackendIPythonNotebook(BackendIPython):
-             sage: from sage.repl.rich_output.backend_ipython import BackendIPythonNotebook
-             sage: backend = BackendIPythonNotebook()
-             sage: backend.threejs_offline_scripts()
--            '...<script src="/nbextensions/threejs/three.min...<\\/script>...'
-+            '...<script src="/nbextensions/threejs/build/three.min...<\\/script>...'
-         """
-         from sage.repl.rich_output import get_display_manager
-         CDN_scripts = get_display_manager().threejs_scripts(online=True)
-         return """
--<script src="/nbextensions/threejs/three.min.js"></script>
--<script src="/nbextensions/threejs/OrbitControls.js"></script>
-+<script src="/nbextensions/threejs/build/three.min.js"></script>
-+<script src="/nbextensions/threejs/examples/js/controls/OrbitControls.js"></script>
- <script>
-   if ( !window.THREE ) document.write('{}');
- </script>
diff --git a/pkgs/applications/science/math/sage/sage-src.nix b/pkgs/applications/science/math/sage/sage-src.nix
index 9351b90680d..dc9c9b5c874 100644
--- a/pkgs/applications/science/math/sage/sage-src.nix
+++ b/pkgs/applications/science/math/sage/sage-src.nix
@@ -10,14 +10,14 @@
 # all get the same sources with the same patches applied.
 
 stdenv.mkDerivation rec {
-  version = "8.8";
+  version = "8.9";
   pname = "sage-src";
 
   src = fetchFromGitHub {
     owner = "sagemath";
     repo = "sage";
     rev = version;
-    sha256 = "0jm7zdkz8wfgrmf6620jfr8kgvprrz3qfl8gzx6rl5z5cm734b6x";
+    sha256 = "1bwga58x3s8z42w5h51c232f91ndsc1861dlb1glhax3pn0rhn3a";
   };
 
   # Patches needed because of particularities of nix or the way this is packaged.
@@ -49,10 +49,6 @@ stdenv.mkDerivation rec {
     # https://trac.sagemath.org/ticket/27660#ticket
     ./patches/do-not-test-find-library.patch
 
-
-    # https://trac.sagemath.org/ticket/28007
-    ./patches/threejs-offline.patch
-
     # Parallelize docubuild using subprocesses, fixing an isolation issue. See
     # https://groups.google.com/forum/#!topic/sage-packaging/YGOm8tkADrE
     ./patches/sphinx-docbuild-subprocesses.patch
@@ -97,14 +93,6 @@ stdenv.mkDerivation rec {
       stripLen = 1;
     })
 
-    # https://trac.sagemath.org/ticket/26932
-    (fetchSageDiff {
-      name = "givaro-4.1.0_fflas-ffpack-2.4.0_linbox-1.6.0.patch";
-      base = "8.8.beta4";
-      rev = "c11d9cfa23ff9f77681a8f12742f68143eed4504";
-      sha256 = "0xzra7mbgqvahk9v45bjwir2mqz73hrhhy314jq5nxrb35ysdxyi";
-    })
-
     # After updating smypow to (https://trac.sagemath.org/ticket/3360) we can
     # now set the cache dir to be withing the .sage directory. This is not
     # strictly necessary, but keeps us from littering in the user's HOME.
diff --git a/pkgs/applications/science/math/sage/sagelib.nix b/pkgs/applications/science/math/sage/sagelib.nix
index 6eac84aaa86..69f7624078e 100644
--- a/pkgs/applications/science/math/sage/sagelib.nix
+++ b/pkgs/applications/science/math/sage/sagelib.nix
@@ -138,8 +138,8 @@ buildPythonPackage rec {
     mkdir -p "$SAGE_SHARE/sage/ext/notebook-ipython"
     mkdir -p "var/lib/sage/installed"
 
+    source build/bin/sage-dist-helpers
     cd src
-    source bin/sage-dist-helpers
 
     ${python.interpreter} -u setup.py --no-user-cfg build
   '';