Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a27de56

Browse files
authored
python.pkgs.matplotlib: add numpy 1.6 compat patch (#55577)
* 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: matplotlib/matplotlib#12478 * sage: add numpy 1.16 compatibility patch https://trac.sagemath.org/ticket/27000
2 parents b6baac3 + 5728028 commit a27de56

File tree

2 files changed

+17
-3
lines changed
  • pkgs

2 files changed

+17
-3
lines changed

pkgs/applications/science/math/sage/sage-src.nix

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,12 @@ stdenv.mkDerivation rec {
105105
sha256 = "1n5c61mvhalcr2wbp66wzsynwwk59aakvx3xqa5zw9nlkx3rd0h1";
106106
})
107107

108+
# https://trac.sagemath.org/ticket/27061
109+
(fetchpatch {
110+
name = "numpy-1.16-inline-fortran.patch";
111+
url = "https://git.sagemath.org/sage.git/patch?id=a05b6b038e1571ab15464e98f76d1927c0c3fd12";
112+
sha256 = "05yq97pq84xi60wb1p9skrad5h5x770gq98ll4frr7hvvmlwsf58";
113+
})
108114
];
109115

110116
patches = nixPatches ++ packageUpgradePatches;

pkgs/development/python-modules/matplotlib/2.nix

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{ stdenv, fetchPypi, python, buildPythonPackage, pycairo, backports_functools_lru_cache
22
, which, cycler, dateutil, nose, numpy, pyparsing, sphinx, tornado, kiwisolver
33
, freetype, libpng, pkgconfig, mock, pytz, pygobject3, functools32, subprocess32
4+
, fetchpatch
45
, enableGhostscript ? false, ghostscript ? null, gtk3
56
, enableGtk2 ? false, pygtk ? null, gobject-introspection
67
, enableGtk3 ? false, cairo
@@ -47,9 +48,16 @@ buildPythonPackage rec {
4748
++ stdenv.lib.optionals enableQt [ pyqt4 ]
4849
++ stdenv.lib.optionals python.isPy2 [ functools32 subprocess32 ];
4950

50-
patches =
51-
[ ./basedirlist.patch ] ++
52-
stdenv.lib.optionals stdenv.isDarwin [ ./darwin-stdenv-2.2.3.patch ];
51+
patches = [
52+
./basedirlist.patch
53+
54+
# https://github.com/matplotlib/matplotlib/pull/12478
55+
(fetchpatch {
56+
name = "numpy-1.16-compat.patch";
57+
url = "https://github.com/matplotlib/matplotlib/commit/2980184d092382a40ab21f95b79582ffae6e19d6.patch";
58+
sha256 = "1c0wj28zy8s5h6qiavx9zzbhlmhjwpzbc3fyyw9039mbnqk0spg2";
59+
})
60+
] ++ stdenv.lib.optionals stdenv.isDarwin [ ./darwin-stdenv-2.2.3.patch ];
5361

5462
# Matplotlib tries to find Tcl/Tk by opening a Tk window and asking the
5563
# corresponding interpreter object for its library paths. This fails if

0 commit comments

Comments
 (0)