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