about summary refs log tree commit diff
path: root/pkgs/development/python-modules/matplotlib
diff options
context:
space:
mode:
authorTimo Kaufmann <timokau@zoho.com>2019-02-11 20:54:31 +0100
committerTimo Kaufmann <timokau@zoho.com>2019-02-11 21:39:21 +0100
commit56d92ba70cf0b38566290a38cf48209257127521 (patch)
treea750e4bfff8e7034d882ea5e0c904654d7674211 /pkgs/development/python-modules/matplotlib
parent36f316007494c388df1fec434c1e658542e3c3cc (diff)
python.pkgs.matplotlib: add numpy 1.6 compat patch
Numpy deprecated asscalar in 1.16. This will be fixed in the next
matplotlib version, but to avoid deprecation warnings (and because they
are breaking the sage testsuite), it can't hurt to backport the fix
already.

Upstream: https://github.com/matplotlib/matplotlib/pull/12478
Diffstat (limited to 'pkgs/development/python-modules/matplotlib')
-rw-r--r--pkgs/development/python-modules/matplotlib/2.nix14
1 files changed, 11 insertions, 3 deletions
diff --git a/pkgs/development/python-modules/matplotlib/2.nix b/pkgs/development/python-modules/matplotlib/2.nix
index 129b864a241d2..6334d2e4f7939 100644
--- a/pkgs/development/python-modules/matplotlib/2.nix
+++ b/pkgs/development/python-modules/matplotlib/2.nix
@@ -1,6 +1,7 @@
 { stdenv, fetchPypi, python, buildPythonPackage, pycairo, backports_functools_lru_cache
 , which, cycler, dateutil, nose, numpy, pyparsing, sphinx, tornado, kiwisolver
 , freetype, libpng, pkgconfig, mock, pytz, pygobject3, functools32, subprocess32
+, fetchpatch
 , enableGhostscript ? false, ghostscript ? null, gtk3
 , enableGtk2 ? false, pygtk ? null, gobject-introspection
 , enableGtk3 ? false, cairo
@@ -47,9 +48,16 @@ buildPythonPackage rec {
     ++ stdenv.lib.optionals enableQt [ pyqt4 ]
     ++ stdenv.lib.optionals python.isPy2 [ functools32 subprocess32 ];
 
-  patches =
-    [ ./basedirlist.patch ] ++
-    stdenv.lib.optionals stdenv.isDarwin [ ./darwin-stdenv-2.2.3.patch ];
+  patches = [
+    ./basedirlist.patch
+
+    # https://github.com/matplotlib/matplotlib/pull/12478
+    (fetchpatch {
+      name = "numpy-1.16-compat.patch";
+      url = "https://github.com/matplotlib/matplotlib/commit/2980184d092382a40ab21f95b79582ffae6e19d6.patch";
+      sha256 = "1c0wj28zy8s5h6qiavx9zzbhlmhjwpzbc3fyyw9039mbnqk0spg2";
+    })
+  ] ++ stdenv.lib.optionals stdenv.isDarwin [ ./darwin-stdenv-2.2.3.patch ];
 
   # Matplotlib tries to find Tcl/Tk by opening a Tk window and asking the
   # corresponding interpreter object for its library paths. This fails if