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";
|
2023-03-15 16:39:30 +00:00
|
|
|
version = "8.11.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-03-15 16:39:30 +00:00
|
|
|
sha256 = "735cede4099dbc903ee540307b9171fbfef4aa75cfcacc5a273b2cda2f02be04";
|
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
|
|
|
|
] ++ 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
|
|
|
'';
|
|
|
|
|
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";
|
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
|
|
|
}
|