nixpkgs/pkgs/development/python-modules/ipython/default.nix
2017-11-11 08:57:09 +01:00

72 lines
1.4 KiB
Nix

{ lib
, stdenv
, buildPythonPackage
, fetchPypi
, pythonOlder
# Build dependencies
, glibcLocales
# Test dependencies
, nose
, pygments
# Runtime dependencies
, jedi
, decorator
, pickleshare
, simplegeneric
, traitlets
, prompt_toolkit
, pexpect
, appnope
, typing
}:
buildPythonPackage rec {
pname = "ipython";
version = "6.2.1";
name = "${pname}-${version}";
src = fetchPypi {
inherit pname version;
sha256 = "51c158a6c8b899898d1c91c6b51a34110196815cc905f9be0fa5878e19355608";
};
prePatch = lib.optionalString stdenv.isDarwin ''
substituteInPlace setup.py --replace "'gnureadline'" " "
'';
buildInputs = [ glibcLocales ];
checkInputs = [ nose pygments ];
propagatedBuildInputs = [
jedi
decorator
pickleshare
simplegeneric
traitlets
prompt_toolkit
pexpect
] ++ lib.optionals stdenv.isDarwin [appnope]
++ lib.optionals (pythonOlder "3.5") [ typing ];
LC_ALL="en_US.UTF-8";
doCheck = false; # Circular dependency with ipykernel
checkPhase = ''
nosetests
'';
# IPython 6.0.0 and above does not support Python < 3.3.
# The last IPython version to support older Python versions
# is 5.3.x.
disabled = pythonOlder "3.3";
meta = {
description = "IPython: Productive Interactive Computing";
homepage = http://ipython.org/;
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ bjornfor jgeerds fridh ];
};
}