2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pythonOlder
|
2022-02-10 20:34:41 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
# Build dependencies
|
2022-07-14 12:49:19 +00:00
|
|
|
, setuptools
|
2022-02-10 20:34:41 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
# Runtime dependencies
|
|
|
|
, decorator
|
2023-11-16 04:20:00 +00:00
|
|
|
, exceptiongroup
|
2022-02-10 20:34:41 +00:00
|
|
|
, jedi
|
2021-06-28 23:13:55 +00:00
|
|
|
, matplotlib-inline
|
2022-02-10 20:34:41 +00:00
|
|
|
, pexpect
|
2021-08-05 21:33:18 +00:00
|
|
|
, prompt-toolkit
|
2022-02-10 20:34:41 +00:00
|
|
|
, pygments
|
|
|
|
, stack-data
|
|
|
|
, traitlets
|
2023-11-16 04:20:00 +00:00
|
|
|
, typing-extensions
|
2022-02-10 20:34:41 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
# Optional dependencies
|
|
|
|
, ipykernel
|
|
|
|
, ipyparallel
|
|
|
|
, ipywidgets
|
|
|
|
, matplotlib
|
|
|
|
, nbconvert
|
|
|
|
, nbformat
|
|
|
|
, notebook
|
|
|
|
, qtconsole
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
# Test dependencies
|
2024-04-21 15:54:59 +00:00
|
|
|
, pickleshare
|
|
|
|
, pytest-asyncio
|
|
|
|
, pytest7CheckHook
|
2022-02-10 20:34:41 +00:00
|
|
|
, testpath
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
buildPythonPackage rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "ipython";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "8.23.0";
|
2024-02-29 20:09:43 +00:00
|
|
|
pyproject = true;
|
|
|
|
disabled = pythonOlder "3.10";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-dGjtr09t4+G5EuV/ZsJB5v08cJny7CE24jnhQugAJ00=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
build-system = [
|
2022-07-14 12:49:19 +00:00
|
|
|
setuptools
|
2022-02-10 20:34:41 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
dependencies = [
|
2020-04-24 23:36:52 +00:00
|
|
|
decorator
|
2022-02-10 20:34:41 +00:00
|
|
|
jedi
|
2021-06-28 23:13:55 +00:00
|
|
|
matplotlib-inline
|
2022-02-10 20:34:41 +00:00
|
|
|
pexpect
|
2021-08-05 21:33:18 +00:00
|
|
|
prompt-toolkit
|
2020-04-24 23:36:52 +00:00
|
|
|
pygments
|
2022-02-10 20:34:41 +00:00
|
|
|
stack-data
|
|
|
|
traitlets
|
2023-11-16 04:20:00 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.11") [
|
|
|
|
exceptiongroup
|
2024-04-21 15:54:59 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.12") [
|
2023-11-16 04:20:00 +00:00
|
|
|
typing-extensions
|
2022-02-10 20:34:41 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
optional-dependencies = {
|
|
|
|
kernel = [ ipykernel ];
|
|
|
|
nbconvert = [ nbconvert ];
|
|
|
|
nbformat = [ nbformat ];
|
|
|
|
notebook = [
|
|
|
|
ipywidgets
|
|
|
|
notebook
|
|
|
|
];
|
|
|
|
parallel = [ ipyparallel ];
|
|
|
|
qtconsole = [ qtconsole ];
|
|
|
|
matplotlib = [ matplotlib ];
|
|
|
|
};
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"IPython"
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export HOME=$TMPDIR
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
# doctests try to fetch an image from the internet
|
2023-11-16 04:20:00 +00:00
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace '"--ipdoctest-modules",' '"--ipdoctest-modules", "--ignore=IPython/core/display.py",'
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2024-04-21 15:54:59 +00:00
|
|
|
pickleshare
|
|
|
|
pytest-asyncio
|
|
|
|
pytest7CheckHook
|
2022-02-10 20:34:41 +00:00
|
|
|
testpath
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
disabledTests = [
|
|
|
|
# UnboundLocalError: local variable 'child' referenced before assignment
|
|
|
|
"test_system_interrupt"
|
|
|
|
] ++ lib.optionals (stdenv.isDarwin) [
|
2022-03-30 09:31:56 +00:00
|
|
|
# FileNotFoundError: [Errno 2] No such file or directory: 'pbpaste'
|
|
|
|
"test_clipboard_get"
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "IPython: Productive Interactive Computing";
|
2023-11-16 04:20:00 +00:00
|
|
|
downloadPage = "https://github.com/ipython/ipython/";
|
2022-04-27 09:35:20 +00:00
|
|
|
homepage = "https://ipython.org/";
|
2022-07-14 12:49:19 +00:00
|
|
|
changelog = "https://github.com/ipython/ipython/blob/${version}/docs/source/whatsnew/version${lib.versions.major version}.rst";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ bjornfor fridh ];
|
|
|
|
};
|
2022-03-30 09:31:56 +00:00
|
|
|
}
|