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, traitlets
16, prompt_toolkit
17, pexpect
18, appnope
19, backcall
20, fetchpatch
21}:
22
23buildPythonPackage rec {
24 pname = "ipython";
25 version = "7.9.0";
26
27 src = fetchPypi {
28 inherit pname version;
29 sha256 = "103jkw18z7fnwdal1mdbijjxi1fndzn31g887lmj7ddpf2r07lyz";
30 };
31
32 prePatch = lib.optionalString stdenv.isDarwin ''
33 substituteInPlace setup.py --replace "'gnureadline'" " "
34 '';
35
36 buildInputs = [ glibcLocales ];
37
38 checkInputs = [ nose pygments ];
39
40 propagatedBuildInputs = [
41 jedi
42 decorator
43 pickleshare
44 traitlets
45 prompt_toolkit
46 pygments
47 pexpect
48 backcall
49 ] ++ lib.optionals stdenv.isDarwin [appnope];
50
51 LC_ALL="en_US.UTF-8";
52
53 doCheck = false; # Circular dependency with ipykernel
54
55 checkPhase = ''
56 nosetests
57 '';
58
59 pythonImportsCheck = [
60 "IPython"
61 ];
62
63 meta = with lib; {
64 description = "IPython: Productive Interactive Computing";
65 homepage = http://ipython.org/;
66 license = licenses.bsd3;
67 maintainers = with maintainers; [ bjornfor fridh ];
68 };
69}