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}:
21
22buildPythonPackage rec {
23 pname = "ipython";
24 version = "7.16.1";
25 disabled = pythonOlder "3.6";
26
27 src = fetchPypi {
28 inherit pname version;
29 sha256 = "9f4fcb31d3b2c533333893b9172264e4821c1ac91839500f31bd43f2c59b3ccf";
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}