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
|
|
|
|
, glibcLocales
|
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
|
|
|
|
, black
|
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-05 16:20:37 +00:00
|
|
|
buildPythonPackage (rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "ipython";
|
2022-02-10 20:34:41 +00:00
|
|
|
version = "8.0.1";
|
|
|
|
format = "pyproject";
|
|
|
|
disabled = pythonOlder "3.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-02-10 20:34:41 +00:00
|
|
|
sha256 = "0x19sj4dlq7r4p1mqnpx9245r8dwvpjwd8n34snfm37a452lsmmb";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
buildInputs = [
|
|
|
|
glibcLocales
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2022-02-10 20:34:41 +00:00
|
|
|
backcall
|
|
|
|
black
|
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
|
|
|
|
|
|
|
LC_ALL="en_US.UTF-8";
|
|
|
|
|
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
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "IPython: Productive Interactive Computing";
|
|
|
|
homepage = "http://ipython.org/";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ bjornfor fridh ];
|
|
|
|
};
|
2022-03-05 16:20:37 +00:00
|
|
|
} // lib.optionalAttrs stdenv.isDarwin {
|
|
|
|
disabledTests = [
|
|
|
|
"test_clipboard_get" # uses pbpaste
|
|
|
|
];
|
|
|
|
})
|