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
|
2022-02-10 20:34:41 +00:00
|
|
|
, appnope
|
|
|
|
, backcall
|
2020-04-24 23:36:52 +00:00
|
|
|
, 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
|
2020-04-24 23:36:52 +00:00
|
|
|
, pickleshare
|
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
|
|
|
|
|
|
|
# Test dependencies
|
|
|
|
, pytestCheckHook
|
|
|
|
, 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";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "8.15.0";
|
2022-02-10 20:34:41 +00:00
|
|
|
format = "pyproject";
|
|
|
|
disabled = pythonOlder "3.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-11-16 04:20:00 +00:00
|
|
|
sha256 = "sha256-K661vmlJ7uv1MhUPgXRvgzPizM4C3hx+7d4/I+1enx4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
2022-02-10 20:34:41 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2022-02-10 20:34:41 +00:00
|
|
|
backcall
|
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
|
2020-04-24 23:36:52 +00:00
|
|
|
pickleshare
|
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
|
|
|
|
] ++ lib.optionals (pythonOlder "3.10") [
|
|
|
|
typing-extensions
|
2022-02-10 20:34:41 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
appnope
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
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 = [
|
2022-02-10 20:34:41 +00:00
|
|
|
pytestCheckHook
|
|
|
|
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
|
|
|
}
|