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: https://github.com/matplotlib/matplotlib/pull/12478

* sage: add numpy 1.16 compatibility patch

https://trac.sagemath.org/ticket/27000
This commit is contained in:
Timo Kaufmann 2019-02-11 23:43:46 +01:00 committed by GitHub
commit a27de564b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 3 deletions

View File

@ -105,6 +105,12 @@ stdenv.mkDerivation rec {
sha256 = "1n5c61mvhalcr2wbp66wzsynwwk59aakvx3xqa5zw9nlkx3rd0h1"; sha256 = "1n5c61mvhalcr2wbp66wzsynwwk59aakvx3xqa5zw9nlkx3rd0h1";
}) })
# https://trac.sagemath.org/ticket/27061
(fetchpatch {
name = "numpy-1.16-inline-fortran.patch";
url = "https://git.sagemath.org/sage.git/patch?id=a05b6b038e1571ab15464e98f76d1927c0c3fd12";
sha256 = "05yq97pq84xi60wb1p9skrad5h5x770gq98ll4frr7hvvmlwsf58";
})
]; ];
patches = nixPatches ++ packageUpgradePatches; patches = nixPatches ++ packageUpgradePatches;

View File

@ -1,6 +1,7 @@
{ stdenv, fetchPypi, python, buildPythonPackage, pycairo, backports_functools_lru_cache { stdenv, fetchPypi, python, buildPythonPackage, pycairo, backports_functools_lru_cache
, which, cycler, dateutil, nose, numpy, pyparsing, sphinx, tornado, kiwisolver , which, cycler, dateutil, nose, numpy, pyparsing, sphinx, tornado, kiwisolver
, freetype, libpng, pkgconfig, mock, pytz, pygobject3, functools32, subprocess32 , freetype, libpng, pkgconfig, mock, pytz, pygobject3, functools32, subprocess32
, fetchpatch
, enableGhostscript ? false, ghostscript ? null, gtk3 , enableGhostscript ? false, ghostscript ? null, gtk3
, enableGtk2 ? false, pygtk ? null, gobject-introspection , enableGtk2 ? false, pygtk ? null, gobject-introspection
, enableGtk3 ? false, cairo , enableGtk3 ? false, cairo
@ -47,9 +48,16 @@ buildPythonPackage rec {
++ stdenv.lib.optionals enableQt [ pyqt4 ] ++ stdenv.lib.optionals enableQt [ pyqt4 ]
++ stdenv.lib.optionals python.isPy2 [ functools32 subprocess32 ]; ++ stdenv.lib.optionals python.isPy2 [ functools32 subprocess32 ];
patches = patches = [
[ ./basedirlist.patch ] ++ ./basedirlist.patch
stdenv.lib.optionals stdenv.isDarwin [ ./darwin-stdenv-2.2.3.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 # Matplotlib tries to find Tcl/Tk by opening a Tk window and asking the
# corresponding interpreter object for its library paths. This fails if # corresponding interpreter object for its library paths. This fails if