summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/matplotlib
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/matplotlib')
-rw-r--r--pkgs/development/python-modules/matplotlib/2.nix19
-rw-r--r--pkgs/development/python-modules/matplotlib/default.nix38
-rw-r--r--pkgs/development/python-modules/matplotlib/setup-darwin.cfg7
-rw-r--r--pkgs/development/python-modules/matplotlib/setup.cfg5
4 files changed, 27 insertions, 42 deletions
diff --git a/pkgs/development/python-modules/matplotlib/2.nix b/pkgs/development/python-modules/matplotlib/2.nix
index 2c929d9a694e..a6ee1a3bade7 100644
--- a/pkgs/development/python-modules/matplotlib/2.nix
+++ b/pkgs/development/python-modules/matplotlib/2.nix
@@ -1,24 +1,16 @@
-{ lib, stdenv, fetchPypi, python, buildPythonPackage, pycairo, backports_functools_lru_cache
+{ lib, stdenv, fetchPypi, writeText, python, buildPythonPackage, pycairo, backports_functools_lru_cache
, which, cycler, dateutil, nose, numpy, pyparsing, sphinx, tornado, kiwisolver
, freetype, libpng, pkg-config, mock, pytz, pygobject3, gobject-introspection, functools32, subprocess32
, fetchpatch
-, enableGhostscript ? false, ghostscript ? null, gtk3
+, enableGhostscript ? false, ghostscript, gtk3
, enableGtk3 ? false, cairo
# darwin has its own "MacOSX" backend
-, enableTk ? !stdenv.isDarwin, tcl ? null, tk ? null, tkinter ? null, libX11 ? null
+, enableTk ? !stdenv.isDarwin, tcl, tk, tkinter, libX11
, enableQt ? false, pyqt4
, Cocoa
, pythonOlder
}:
-assert enableGhostscript -> ghostscript != null;
-assert enableTk -> (tcl != null)
- && (tk != null)
- && (tkinter != null)
- && (libX11 != null)
- ;
-assert enableQt -> pyqt4 != null;
-
buildPythonPackage rec {
version = "2.2.3";
pname = "matplotlib";
@@ -54,7 +46,10 @@ buildPythonPackage rec {
++ lib.optionals enableQt [ pyqt4 ]
++ lib.optionals python.isPy2 [ functools32 subprocess32 ];
- setup_cfg = ./setup.cfg;
+ passthru.config = {
+ directories = { basedirlist = "."; };
+ };
+ setup_cfg = writeText "setup.cfg" (lib.generators.toINI {} passthru.config);
preBuild = ''
cp "$setup_cfg" ./setup.cfg
'';
diff --git a/pkgs/development/python-modules/matplotlib/default.nix b/pkgs/development/python-modules/matplotlib/default.nix
index 4be4189f8c7a..7364920cba22 100644
--- a/pkgs/development/python-modules/matplotlib/default.nix
+++ b/pkgs/development/python-modules/matplotlib/default.nix
@@ -1,33 +1,25 @@
-{ lib, stdenv, fetchPypi, python, buildPythonPackage, isPy3k, pycairo, backports_functools_lru_cache
+{ lib, stdenv, fetchPypi, writeText, python, buildPythonPackage, isPy3k, pycairo, backports_functools_lru_cache
, which, cycler, dateutil, nose, numpy, pyparsing, sphinx, tornado, kiwisolver
-, freetype, libpng, pkg-config, mock, pytz, pygobject3, gobject-introspection
+, freetype, qhull, libpng, pkg-config, mock, pytz, pygobject3, gobject-introspection
, certifi, pillow
-, enableGhostscript ? true, ghostscript ? null, gtk3
+, enableGhostscript ? true, ghostscript, gtk3
, enableGtk3 ? false, cairo
# darwin has its own "MacOSX" backend
-, enableTk ? !stdenv.isDarwin, tcl ? null, tk ? null, tkinter ? null, libX11 ? null
-, enableQt ? false, pyqt5 ? null
+, enableTk ? !stdenv.isDarwin, tcl, tk, tkinter, libX11
+, enableQt ? false, pyqt5
, Cocoa
, pythonOlder
}:
-assert enableGhostscript -> ghostscript != null;
-assert enableTk -> (tcl != null)
- && (tk != null)
- && (tkinter != null)
- && (libX11 != null)
- ;
-assert enableQt -> pyqt5 != null;
-
buildPythonPackage rec {
- version = "3.3.4";
+ version = "3.4.1";
pname = "matplotlib";
disabled = !isPy3k;
src = fetchPypi {
inherit pname version;
- sha256 = "3e477db76c22929e4c6876c44f88d790aacdf3c3f8f3a90cb1975c0bf37825b0";
+ sha256 = "84d4c4f650f356678a5d658a43ca21a41fca13f9b8b00169c0b76e6a6a948908";
};
XDG_RUNTIME_DIR = "/tmp";
@@ -39,13 +31,23 @@ buildPythonPackage rec {
++ lib.optional stdenv.isDarwin [ Cocoa ];
propagatedBuildInputs =
- [ cycler dateutil numpy pyparsing tornado freetype kiwisolver
- certifi libpng mock pytz pillow ]
+ [ cycler dateutil numpy pyparsing tornado freetype qhull
+ kiwisolver certifi libpng mock pytz pillow ]
++ lib.optionals enableGtk3 [ cairo pycairo gtk3 gobject-introspection pygobject3 ]
++ lib.optionals enableTk [ tcl tk tkinter libX11 ]
++ lib.optionals enableQt [ pyqt5 ];
- setup_cfg = if stdenv.isDarwin then ./setup-darwin.cfg else ./setup.cfg;
+ passthru.config = {
+ directories = { basedirlist = "."; };
+ libs = {
+ system_freetype = true;
+ system_qhull = true;
+ } // lib.optionalAttrs stdenv.isDarwin {
+ # LTO not working in darwin stdenv, see #19312
+ enable_lto = false;
+ };
+ };
+ setup_cfg = writeText "setup.cfg" (lib.generators.toINI {} passthru.config);
preBuild = ''
cp "$setup_cfg" ./setup.cfg
'';
diff --git a/pkgs/development/python-modules/matplotlib/setup-darwin.cfg b/pkgs/development/python-modules/matplotlib/setup-darwin.cfg
deleted file mode 100644
index f6463d9c574a..000000000000
--- a/pkgs/development/python-modules/matplotlib/setup-darwin.cfg
+++ /dev/null
@@ -1,7 +0,0 @@
-[directories]
-basedirlist = .
-
-[libs]
-system_freetype = true
-# LTO not working in darwin stdenv, see #19312
-enable_lto = false
diff --git a/pkgs/development/python-modules/matplotlib/setup.cfg b/pkgs/development/python-modules/matplotlib/setup.cfg
deleted file mode 100644
index 6a7738627651..000000000000
--- a/pkgs/development/python-modules/matplotlib/setup.cfg
+++ /dev/null
@@ -1,5 +0,0 @@
-[directories]
-basedirlist = .
-
-[libs]
-system_freetype = true