Merge pull request #1416 from wkennington/matplot

Update matplotlib to use buildPythonPackage
This commit is contained in:
Domen Kožar 2014-01-02 12:09:04 -08:00
commit 9737d898f3

View File

@ -3439,14 +3439,7 @@ pythonPackages = modules // import ./python-packages-generated.nix {
}; };
# not sure if this is the best way to accomplish this -- needed to provide matplotlib = buildPythonPackage rec {
# objective-c compiler on darwin
matplotlibStdenv = if stdenv.isDarwin
then pkgs.clangStdenv
else pkgs.stdenv;
# TODO: refactor to use pythonBuildPackage
matplotlib = matplotlibStdenv.mkDerivation (rec {
name = "matplotlib-1.3.1"; name = "matplotlib-1.3.1";
src = fetchurl { src = fetchurl {
@ -3454,26 +3447,11 @@ pythonPackages = modules // import ./python-packages-generated.nix {
sha256 = "0smgpn7lwbn02nbyhawyn0n6r3pb65zk501f21bjgavnjjfnf5pa"; sha256 = "0smgpn7lwbn02nbyhawyn0n6r3pb65zk501f21bjgavnjjfnf5pa";
}; };
# error: invalid command 'test' buildInputs = [ python pkgs.which pkgs.ghostscript ] ++
doCheck = false; (if stdenv.isDarwin then [ pkgs.clangStdenv ] else [ pkgs.stdenv ]);
buildInputs = [ python pkgs.which pkgs.ghostscript ];
propagatedBuildInputs = propagatedBuildInputs =
[ dateutil nose numpy pyparsing tornado pkgs.freetype pkgs.libpng pkgs.pkgconfig pkgs.tcl [ dateutil nose numpy pyparsing tornado pkgs.freetype pkgs.libpng pkgs.pkgconfig ];
pkgs.tk pkgs.xlibs.libX11 ];
buildPhase = ''
sed -i '/use_setuptools/d' setup.py
${python}/bin/${python.executable} setup.py build
'';
# The sed expression parses out the python version from an executable with appended characters
installPhase = ''
SITE="$out/lib/${python.libPrefix}/site-packages"
mkdir -p "$SITE"
PYTHONPATH="$PYTHONPATH:$SITE" ${python}/bin/${python.executable} setup.py install --prefix=$out
'';
meta = with stdenv.lib; { meta = with stdenv.lib; {
description = "python plotting library, making publication quality plots"; description = "python plotting library, making publication quality plots";
@ -3481,7 +3459,7 @@ pythonPackages = modules // import ./python-packages-generated.nix {
maintainers = with maintainers; [ lovek323 ]; maintainers = with maintainers; [ lovek323 ];
platforms = platforms.unix; platforms = platforms.unix;
}; };
}); };
mccabe = buildPythonPackage (rec { mccabe = buildPythonPackage (rec {