1{ lib
2, stdenv
3, buildPythonPackage
4, fetchPypi
5# Build dependencies
6, glibcLocales
7# Test dependencies
8, nose
9, pygments
10, testpath
11, isPy27
12, mock
13# Runtime dependencies
14, backports_shutil_get_terminal_size
15, decorator
16, pathlib2
17, pickleshare
18, requests
19, simplegeneric
20, traitlets
21, prompt_toolkit
22, pexpect
23, appnope
24}:
25
26buildPythonPackage rec {
27 pname = "ipython";
28 version = "5.8.0";
29
30 src = fetchPypi {
31 inherit pname version;
32 sha256 = "4bac649857611baaaf76bc82c173aa542f7486446c335fe1a6c05d0d491c8906";
33 };
34
35 prePatch = stdenv.lib.optionalString stdenv.isDarwin ''
36 substituteInPlace setup.py --replace "'gnureadline'" " "
37 '';
38
39 buildInputs = [ glibcLocales ];
40
41 checkInputs = [ nose pygments testpath ] ++ lib.optional isPy27 mock;
42
43 propagatedBuildInputs = [
44 backports_shutil_get_terminal_size decorator pickleshare prompt_toolkit
45 simplegeneric traitlets requests pathlib2 pexpect
46 ] ++ lib.optionals stdenv.isDarwin [ appnope ];
47
48 LC_ALL="en_US.UTF-8";
49
50 doCheck = false; # Circular dependency with ipykernel
51
52 checkPhase = ''
53 nosetests
54 '';
55
56 meta = {
57 description = "IPython: Productive Interactive Computing";
58 homepage = http://ipython.org/;
59 license = lib.licenses.bsd3;
60 maintainers = with lib.maintainers; [ bjornfor orivej lnl7 ];
61 };
62}