python3Packages.matplotlib: 3.1.3 -> 3.2.1, and various cleanups (#84362)
* pythonPackages.matplotlib: add veprbl to maintainers * pythonPackages.matplotlib: remove an old darwin hack * pythonPackages.matplotlib: remove python and stdenv from buildInputs * python3Packages.matplotlib: remove a hack for python33 * pythonPackages.matplotlib: remove outdated checkPhase Downloading the baseline_images is not a real issue, building against older freetype (local_freetype = True) is, perhaps, not what we want. The good news is that the tests would pass (tested on 3.2.1) if we were to enable them: ========== 6684 passed, 1332 skipped, 10 xfailed in 228.64s (0:03:48) ========== * pythonPackages.matplotlib: provide setup.cfg from a file instead of a patch * python3Packages.matplotlib: 3.1.3 -> 3.2.1
This commit is contained in:
@@ -7,7 +7,6 @@
|
||||
# darwin has its own "MacOSX" backend
|
||||
, enableTk ? !stdenv.isDarwin, tcl ? null, tk ? null, tkinter ? null, libX11 ? null
|
||||
, enableQt ? false, pyqt4
|
||||
, libcxx
|
||||
, Cocoa
|
||||
, pythonOlder
|
||||
}:
|
||||
@@ -29,13 +28,20 @@ buildPythonPackage rec {
|
||||
sha256 = "7355bf757ecacd5f0ac9dd9523c8e1a1103faadf8d33c22664178e17533f8ce5";
|
||||
};
|
||||
|
||||
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.isDarwin "-I${libcxx}/include/c++/v1";
|
||||
patches = [
|
||||
# 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";
|
||||
})
|
||||
];
|
||||
|
||||
XDG_RUNTIME_DIR = "/tmp";
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
|
||||
buildInputs = [ python which sphinx stdenv ]
|
||||
buildInputs = [ which sphinx ]
|
||||
++ stdenv.lib.optional enableGhostscript ghostscript
|
||||
++ stdenv.lib.optional stdenv.isDarwin [ Cocoa ];
|
||||
|
||||
@@ -48,16 +54,10 @@ buildPythonPackage rec {
|
||||
++ stdenv.lib.optionals enableQt [ pyqt4 ]
|
||||
++ stdenv.lib.optionals python.isPy2 [ functools32 subprocess32 ];
|
||||
|
||||
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";
|
||||
})
|
||||
];
|
||||
setup_cfg = ./setup.cfg;
|
||||
preBuild = ''
|
||||
cp "$setup_cfg" ./setup.cfg
|
||||
'';
|
||||
|
||||
# Matplotlib tries to find Tcl/Tk by opening a Tk window and asking the
|
||||
# corresponding interpreter object for its library paths. This fails if
|
||||
@@ -73,27 +73,14 @@ buildPythonPackage rec {
|
||||
stdenv.lib.optionalString enableTk
|
||||
"sed -i '/self.tcl_tk_cache = None/s|None|${tcl_tk_cache}|' setupext.py";
|
||||
|
||||
checkPhase = ''
|
||||
${python.interpreter} tests.py
|
||||
'';
|
||||
|
||||
# Test data is not included in the distribution (the `tests` folder
|
||||
# is missing)
|
||||
# Matplotlib needs to be built against a specific version of freetype in
|
||||
# order for all of the tests to pass.
|
||||
doCheck = false;
|
||||
|
||||
prePatch = ''
|
||||
# Failing test: ERROR: matplotlib.tests.test_style.test_use_url
|
||||
sed -i 's/test_use_url/fails/' lib/matplotlib/tests/test_style.py
|
||||
# Failing test: ERROR: test suite for <class 'matplotlib.sphinxext.tests.test_tinypages.TestTinyPages'>
|
||||
sed -i 's/TestTinyPages/fails/' lib/matplotlib/sphinxext/tests/test_tinypages.py
|
||||
# Transient errors
|
||||
sed -i 's/test_invisible_Line_rendering/noop/' lib/matplotlib/tests/test_lines.py
|
||||
'';
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Python plotting library, making publication quality plots";
|
||||
homepage = "https://matplotlib.org/";
|
||||
maintainers = with maintainers; [ lovek323 ];
|
||||
maintainers = with maintainers; [ lovek323 veprbl ];
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user