2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2022-08-21 13:32:41 +00:00
|
|
|
, fetchpatch
|
2020-04-24 23:36:52 +00:00
|
|
|
, 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
|
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
|
|
|
|
|
|
|
|
# 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";
|
2022-07-14 12:49:19 +00:00
|
|
|
version = "8.4.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;
|
2022-07-14 12:49:19 +00:00
|
|
|
sha256 = "f2db3a10254241d9b447232cec8b424847f338d9d36f9a577a6192c332a46abd";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-08-21 13:32:41 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
# The original URL might not be very stable, so let's prefer a copy.
|
|
|
|
urls = [
|
|
|
|
"https://raw.githubusercontent.com/bmwiedemann/openSUSE/9b35e4405a44aa737dda623a7dabe5384172744c/packages/p/python-ipython/ipython-pr13714-xxlimited.patch"
|
|
|
|
"https://github.com/ipython/ipython/pull/13714.diff"
|
|
|
|
];
|
|
|
|
sha256 = "XPOcBo3p8mzMnP0iydns9hX8qCQXTmRgRD0TM+FESCI=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
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
|
|
|
|
] ++ 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
|
|
|
|
substituteInPlace pytest.ini \
|
|
|
|
--replace "--ipdoctest-modules" "--ipdoctest-modules --ignore=IPython/core/display.py"
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
checkInputs = [
|
|
|
|
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";
|
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
|
|
|
}
|