1{ lib
2, stdenv
3, buildPythonPackage
4, fetchPypi
5, pythonOlder
6# Build dependencies
7, glibcLocales
8# Test dependencies
9, nose
10, pygments
11# Runtime dependencies
12, jedi
13, decorator
14, pickleshare
15, simplegeneric
16, traitlets
17, prompt_toolkit
18, pexpect
19, appnope
20, typing
21}:
22
23buildPythonPackage rec {
24 pname = "ipython";
25 version = "6.2.1";
26 name = "${pname}-${version}";
27
28 src = fetchPypi {
29 inherit pname version;
30 sha256 = "51c158a6c8b899898d1c91c6b51a34110196815cc905f9be0fa5878e19355608";
31 };
32
33 prePatch = lib.optionalString stdenv.isDarwin ''
34 substituteInPlace setup.py --replace "'gnureadline'" " "
35 '';
36
37 buildInputs = [ glibcLocales ];
38
39 checkInputs = [ nose pygments ];
40
41 propagatedBuildInputs = [
42 jedi
43 decorator
44 pickleshare
45 simplegeneric
46 traitlets
47 prompt_toolkit
48 pexpect
49 ] ++ lib.optionals stdenv.isDarwin [appnope]
50 ++ lib.optionals (pythonOlder "3.5") [ typing ];
51
52 LC_ALL="en_US.UTF-8";
53
54 doCheck = false; # Circular dependency with ipykernel
55
56 checkPhase = ''
57 nosetests
58 '';
59
60 # IPython 6.0.0 and above does not support Python < 3.3.
61 # The last IPython version to support older Python versions
62 # is 5.3.x.
63 disabled = pythonOlder "3.3";
64
65 meta = {
66 description = "IPython: Productive Interactive Computing";
67 homepage = http://ipython.org/;
68 license = lib.licenses.bsd3;
69 maintainers = with lib.maintainers; [ bjornfor jgeerds fridh ];
70 };
71}