summary refs log tree commit diff
diff options
context:
space:
mode:
authorSandro <sandro.jaeckel@gmail.com>2021-08-22 21:26:12 +0200
committerGitHub <noreply@github.com>2021-08-22 21:26:12 +0200
commit00f31216e0c2f825aaf300ce304b9e95b17028b0 (patch)
tree4557ca6c4d672098dce68e689f46c5ff7dded5fb
parent14f81d33ca92d9a304fe83257da4c9b5b350a4f4 (diff)
parent1a5be74ddddcbef25314f3162ab00c7c4ff7116d (diff)
downloadnixpkgs-00f31216e0c2f825aaf300ce304b9e95b17028b0.tar
nixpkgs-00f31216e0c2f825aaf300ce304b9e95b17028b0.tar.gz
nixpkgs-00f31216e0c2f825aaf300ce304b9e95b17028b0.tar.bz2
nixpkgs-00f31216e0c2f825aaf300ce304b9e95b17028b0.tar.lz
nixpkgs-00f31216e0c2f825aaf300ce304b9e95b17028b0.tar.xz
nixpkgs-00f31216e0c2f825aaf300ce304b9e95b17028b0.tar.zst
nixpkgs-00f31216e0c2f825aaf300ce304b9e95b17028b0.zip
Merge pull request #130396 from collares/sage-9.4
sage: 9.3 -> 9.4
-rw-r--r--pkgs/applications/science/math/maxima/default.nix4
-rw-r--r--pkgs/applications/science/math/pynac/default.nix11
-rw-r--r--pkgs/applications/science/math/sage/patches/do-not-test-find-library.patch18
-rw-r--r--pkgs/applications/science/math/sage/patches/ignore-cmp-deprecation.patch24
-rw-r--r--pkgs/applications/science/math/sage/sage-src.nix61
-rw-r--r--pkgs/applications/science/math/sage/sagelib.nix2
-rw-r--r--pkgs/development/python-modules/memory-allocator/default.nix27
-rw-r--r--pkgs/top-level/python-packages.nix2
8 files changed, 56 insertions, 93 deletions
diff --git a/pkgs/applications/science/math/maxima/default.nix b/pkgs/applications/science/math/maxima/default.nix
index 7edbeaee085..2b82a8f8170 100644
--- a/pkgs/applications/science/math/maxima/default.nix
+++ b/pkgs/applications/science/math/maxima/default.nix
@@ -4,7 +4,7 @@
 
 let
   name    = "maxima";
-  version = "5.44.0";
+  version = "5.45.0";
 
   lisp-compiler = if ecl-fasl then ecl else sbcl;
 
@@ -18,7 +18,7 @@ stdenv.mkDerivation ({
 
   src = fetchurl {
     url = "mirror://sourceforge/${name}/${name}-${version}.tar.gz";
-    sha256 = "1v6jr5s6hhj6r18gfk6hgxk2qd6z1dxkrjq9ss2z1y6sqi45wgyr";
+    sha256 = "sha256-x2MfMmRIBc67e6/vOrUzHEus0sJ+OE/YgyO1A5pg0Ng=";
   };
 
   nativeBuildInputs = [
diff --git a/pkgs/applications/science/math/pynac/default.nix b/pkgs/applications/science/math/pynac/default.nix
index 138c97d73be..88515b92bea 100644
--- a/pkgs/applications/science/math/pynac/default.nix
+++ b/pkgs/applications/science/math/pynac/default.nix
@@ -1,4 +1,5 @@
 { lib, stdenv
+, fetchpatch
 , fetchFromGitHub
 , autoreconfHook
 , pkg-config
@@ -20,6 +21,16 @@ stdenv.mkDerivation rec {
     sha256 = "sha256-ocR7emXtKs+Xe2f6dh4xEDAacgiolY8mtlLnWnNBS8A=";
   };
 
+  patches = [
+    # the patch below is included in sage 9.4 and should be included
+    # in a future pynac release. see https://trac.sagemath.org/ticket/28357
+    (fetchpatch {
+      name = "realpartloop.patch";
+      url = "https://git.sagemath.org/sage.git/plain/build/pkgs/pynac/patches/realpartloop.patch?h=9.4.beta5";
+      sha256 = "sha256-1nj0xtlFN5fZKEiRLD+tiW/ZtxMQre1ziEGA0OVUGE4=";
+    })
+  ];
+
   buildInputs = [
     flint
     gmp
diff --git a/pkgs/applications/science/math/sage/patches/do-not-test-find-library.patch b/pkgs/applications/science/math/sage/patches/do-not-test-find-library.patch
index 0dbfba642e8..178cef3e54e 100644
--- a/pkgs/applications/science/math/sage/patches/do-not-test-find-library.patch
+++ b/pkgs/applications/science/math/sage/patches/do-not-test-find-library.patch
@@ -1,8 +1,8 @@
 diff --git a/src/sage/env.py b/src/sage/env.py
-index 2908f5d04f..81dfd75c0d 100644
+index 95980cc2df..37107a30e1 100644
 --- a/src/sage/env.py
 +++ b/src/sage/env.py
-@@ -218,93 +218,12 @@ NTL_LIBDIR = var("NTL_LIBDIR")
+@@ -227,93 +227,12 @@ OPENMP_CXXFLAGS = var("OPENMP_CXXFLAGS", "")
  SAGE_BANNER = var("SAGE_BANNER", "")
  SAGE_IMPORTALL = var("SAGE_IMPORTALL", "yes")
  
@@ -51,10 +51,9 @@ index 2908f5d04f..81dfd75c0d 100644
 -        if sys.platform == 'cygwin':
 -            # Later down we take the first matching DLL found, so search
 -            # SAGE_LOCAL first so that it takes precedence
--            search_directories = [
--                Path(SAGE_LOCAL) / 'bin',
--                Path(sysconfig.get_config_var('BINDIR')),
--            ]
+-            if SAGE_LOCAL:
+-                search_directories.append(Path(SAGE_LOCAL) / 'bin')
+-            search_directories.append(Path(sysconfig.get_config_var('BINDIR')))
 -            # Note: The following is not very robust, since if there are multible
 -            # versions for the same library this just selects one more or less
 -            # at arbitrary. However, practically speaking, on Cygwin, there
@@ -66,14 +65,15 @@ index 2908f5d04f..81dfd75c0d 100644
 -            else:
 -                ext = 'so'
 -
--            search_directories = [Path(SAGE_LOCAL) / 'lib']
+-            if SAGE_LOCAL:
+-                search_directories.append(Path(SAGE_LOCAL) / 'lib')
 -            libdir = sysconfig.get_config_var('LIBDIR')
 -            if libdir is not None:
 -                libdir = Path(libdir)
 -                search_directories.append(libdir)
 -
 -                multiarchlib = sysconfig.get_config_var('MULTIARCH')
--                if multiarchlib is not None: 
+-                if multiarchlib is not None:
 -                    search_directories.append(libdir / multiarchlib),
 -
 -            patterns = [f'lib{libname}.{ext}']
@@ -97,4 +97,4 @@ index 2908f5d04f..81dfd75c0d 100644
 +GAP_SO = var("GAP_SO", '/default')
  
  # post process
- if ' ' in DOT_SAGE:
+ if DOT_SAGE is not None and ' ' in DOT_SAGE:
diff --git a/pkgs/applications/science/math/sage/patches/ignore-cmp-deprecation.patch b/pkgs/applications/science/math/sage/patches/ignore-cmp-deprecation.patch
deleted file mode 100644
index a91ee319b8f..00000000000
--- a/pkgs/applications/science/math/sage/patches/ignore-cmp-deprecation.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-diff --git a/src/sage/tests/cmdline.py b/src/sage/tests/cmdline.py
-index 6e034dcb5a..8ec60ec72b 100644
---- a/src/sage/tests/cmdline.py
-+++ b/src/sage/tests/cmdline.py
-@@ -660,8 +660,8 @@ def test_executable(args, input="", timeout=100.0, pydebug_ignore_warnings=False
-         sage: with open(input, 'w') as F:
-         ....:     _ = F.write(s)
-         sage: L = ["sage", "--rst2ipynb", input, output]
--        sage: test_executable(L)                              # optional - rst2ipynb
--        ('', '', 0)
-+        sage: test_executable(L)[2]                           # optional - rst2ipynb
-+        0
-         sage: import json                                     # optional - rst2ipynb
-         sage: d = json.load(open(output,'r'))                 # optional - rst2ipynb
-         sage: type(d)                                         # optional - rst2ipynb
-@@ -757,8 +757,6 @@ def test_executable(args, input="", timeout=100.0, pydebug_ignore_warnings=False
-         ///
-         4
-         }}}
--        sage: err # py2 # optional -- sagenb
--        ''
-         sage: ret # py2 # optional -- sagenb
-         0
- 
diff --git a/pkgs/applications/science/math/sage/sage-src.nix b/pkgs/applications/science/math/sage/sage-src.nix
index 218ab920a87..1e1fd0a4261 100644
--- a/pkgs/applications/science/math/sage/sage-src.nix
+++ b/pkgs/applications/science/math/sage/sage-src.nix
@@ -29,14 +29,14 @@ let
   );
 in
 stdenv.mkDerivation rec {
-  version = "9.3";
+  version = "9.4";
   pname = "sage-src";
 
   src = fetchFromGitHub {
     owner = "sagemath";
     repo = "sage";
     rev = version;
-    sha256 = "sha256-l9DX8jcDdKA7GJ6xU+nBsmlZxrcZ9ZUAJju621ooBEo=";
+    sha256 = "sha256-jqkr4meG02KbTCMsGvyr1UbosS4ZuUJhPXU/InuS+9A=";
   };
 
   # Patches needed because of particularities of nix or the way this is packaged.
@@ -77,64 +77,9 @@ stdenv.mkDerivation rec {
   # be empty since dependencies update all the time.
   packageUpgradePatches = [
     # 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
+    # now set the cache dir to be within the .sage directory. This is not
     # strictly necessary, but keeps us from littering in the user's HOME.
     ./patches/sympow-cache.patch
-
-    # ignore a deprecation warning for usage of `cmp` in the attrs library in the doctests
-    ./patches/ignore-cmp-deprecation.patch
-
-    # remove use of matplotlib function deprecated in 3.4
-    # https://trac.sagemath.org/ticket/31827
-    (fetchSageDiff {
-      base = "9.3";
-      name = "remove-matplotlib-deprecated-function.patch";
-      rev = "32b2bcaefddc4fa3d2aee6fa690ce1466cbb5948";
-      sha256 = "sha256-SXcUGBMOoE9HpuBzgKC3P6cUmM5MiktXbe/7dVdrfWo=";
-    })
-
-    # pari 2.13 update
-    # https://trac.sagemath.org/ticket/30801
-    #
-    # the last commit in that ticket is
-    # c78b1470fccd915e2fa93f95f2fefba6220fb1f7, but commits after
-    # 10a4531721d2700fd717e2b3a1364508ffd971c3 only deal with 32-bit
-    # and post-26635 breakage, none of which is relevant to us. since
-    # there are post-9.4.beta0 rebases after that, we just skip later
-    # commits.
-    (fetchSageDiff {
-      base = "9.3";
-      name = "pari-2.13.1.patch";
-      rev = "10a4531721d2700fd717e2b3a1364508ffd971c3";
-      sha256 = "sha256-gffWKK9CMREaNOb5zb63iZUgON4FvsPrMQNqe+5ZU9E=";
-    })
-
-    # sympy 1.8 update
-    # https://trac.sagemath.org/ticket/31647
-    (fetchSageDiff {
-      base = "9.4.beta0";
-      name = "sympy-1.8.patch";
-      rev = "fa864b36e15696450c36d54215b1e68183b29d25";
-      sha256 = "sha256-fj/9QEZlVF0fw9NpWflkTuBSKpGjCE6b96ECBgdn77o=";
-    })
-
-    # sphinx 4 update
-    # https://trac.sagemath.org/ticket/31696
-    (fetchSageDiff {
-      base = "9.4.beta3";
-      name = "sphinx-4.patch";
-      rev = "bc84af8c795b7da433d2000afc3626ee65ba28b8";
-      sha256 = "sha256-5Kvs9jarC8xRIU1rdmvIWxQLC25ehiTLJpg5skh8WNM=";
-    })
-
-    # eclib 20210625 update
-    # https://trac.sagemath.org/ticket/31443
-    (fetchSageDiff {
-      base = "9.4.beta3";
-      name = "eclib-20210625.patch";
-      rev = "789550ca04c94acfb1e803251538996a34962038";
-      sha256 = "sha256-VlyEn5hg3joG8t/GwiRfq9TzJ54AoHxLolsNQ3shc2c=";
-    })
   ];
 
   patches = nixPatches ++ bugfixPatches ++ packageUpgradePatches;
diff --git a/pkgs/applications/science/math/sage/sagelib.nix b/pkgs/applications/science/math/sage/sagelib.nix
index f60cb64d2e8..b9c98ed64d0 100644
--- a/pkgs/applications/science/math/sage/sagelib.nix
+++ b/pkgs/applications/science/math/sage/sagelib.nix
@@ -27,6 +27,7 @@
 , linbox
 , m4ri
 , m4rie
+, memory-allocator
 , libmpc
 , mpfi
 , ntl
@@ -107,6 +108,7 @@ buildPythonPackage rec {
     lrcalc
     m4ri
     m4rie
+    memory-allocator
     mpfi
     ntl
     blas
diff --git a/pkgs/development/python-modules/memory-allocator/default.nix b/pkgs/development/python-modules/memory-allocator/default.nix
new file mode 100644
index 00000000000..cbb521ea985
--- /dev/null
+++ b/pkgs/development/python-modules/memory-allocator/default.nix
@@ -0,0 +1,27 @@
+{ lib
+, fetchPypi
+, buildPythonPackage
+, cython
+}:
+
+buildPythonPackage rec {
+  pname = "memory-allocator";
+  version = "0.1.0";
+
+  src = fetchPypi {
+    inherit version;
+    pname = "memory_allocator";
+    sha256 = "sha256-UUcR71e3eAQIQpmWM+AVQxVtgHvrNjaIlHo5pURUln0=";
+  };
+
+  propagatedBuildInputs = [ cython ];
+
+  pythonImportsCheck = [ "memory_allocator" ];
+
+  meta = with lib; {
+    description = "An extension class to allocate memory easily with cython";
+    homepage = "https://github.com/sagemath/memory_allocator/";
+    maintainers = teams.sage.members;
+    license = licenses.lgpl3Plus;
+  };
+}
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 0e1ce09de95..f0e7f84350d 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -4471,6 +4471,8 @@ in {
 
   memcached = callPackage ../development/python-modules/memcached { };
 
+  memory-allocator = callPackage ../development/python-modules/memory-allocator { };
+
   memory_profiler = callPackage ../development/python-modules/memory_profiler { };
 
   mercantile = callPackage ../development/python-modules/mercantile { };