evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / development / python-modules / ipython / default.nix
blob33c3c0a8a75422ee3e90f683f8293137ec34c043
2   lib,
3   stdenv,
4   buildPythonPackage,
5   fetchPypi,
6   pythonOlder,
8   # Build dependencies
9   setuptools,
11   # Runtime dependencies
12   decorator,
13   exceptiongroup,
14   jedi,
15   matplotlib-inline,
16   pexpect,
17   prompt-toolkit,
18   pygments,
19   stack-data,
20   traitlets,
21   typing-extensions,
23   # Optional dependencies
24   ipykernel,
25   ipyparallel,
26   ipywidgets,
27   matplotlib,
28   nbconvert,
29   nbformat,
30   notebook,
31   qtconsole,
33   # Reverse dependency
34   sage,
36   # Test dependencies
37   pickleshare,
38   pytest-asyncio,
39   pytestCheckHook,
40   testpath,
43 buildPythonPackage rec {
44   pname = "ipython";
45   version = "8.27.0";
46   pyproject = true;
47   disabled = pythonOlder "3.10";
49   src = fetchPypi {
50     inherit pname version;
51     hash = "sha256-C5mi3J8V/WhpLomOVWhyXG1JxSfTap+1lg/73qqC/34=";
52   };
54   build-system = [ setuptools ];
56   dependencies =
57     [
58       decorator
59       jedi
60       matplotlib-inline
61       pexpect
62       prompt-toolkit
63       pygments
64       stack-data
65       traitlets
66     ]
67     ++ lib.optionals (pythonOlder "3.11") [ exceptiongroup ]
68     ++ lib.optionals (pythonOlder "3.12") [ typing-extensions ];
70   optional-dependencies = {
71     kernel = [ ipykernel ];
72     nbconvert = [ nbconvert ];
73     nbformat = [ nbformat ];
74     notebook = [
75       ipywidgets
76       notebook
77     ];
78     parallel = [ ipyparallel ];
79     qtconsole = [ qtconsole ];
80     matplotlib = [ matplotlib ];
81   };
83   pythonImportsCheck = [ "IPython" ];
85   preCheck = ''
86     export HOME=$TMPDIR
88     # doctests try to fetch an image from the internet
89     substituteInPlace pyproject.toml \
90       --replace-fail '"--ipdoctest-modules",' '"--ipdoctest-modules", "--ignore=IPython/core/display.py",'
91   '';
93   nativeCheckInputs = [
94     pickleshare
95     pytest-asyncio
96     pytestCheckHook
97     testpath
98   ];
100   disabledTests =
101     [
102       # UnboundLocalError: local variable 'child' referenced before assignment
103       "test_system_interrupt"
104     ]
105     ++ lib.optionals (stdenv.hostPlatform.isDarwin) [
106       # FileNotFoundError: [Errno 2] No such file or directory: 'pbpaste'
107       "test_clipboard_get"
108     ];
110   passthru.tests = {
111     inherit sage;
112   };
114   meta = with lib; {
115     description = "IPython: Productive Interactive Computing";
116     downloadPage = "https://github.com/ipython/ipython/";
117     homepage = "https://ipython.org/";
118     changelog = "https://github.com/ipython/ipython/blob/${version}/docs/source/whatsnew/version${lib.versions.major version}.rst";
119     license = licenses.bsd3;
120     maintainers = with maintainers; [ bjornfor ] ++ teams.jupyter.members;
121   };