2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2023-03-15 16:39:30 +00:00
|
|
|
, pythonOlder
|
|
|
|
, substituteAll
|
|
|
|
, hatchling
|
2020-04-24 23:36:52 +00:00
|
|
|
, ipykernel
|
2023-03-15 16:39:30 +00:00
|
|
|
, ipython
|
|
|
|
, jupyter-client
|
|
|
|
, jupyter-core
|
2021-08-05 21:33:18 +00:00
|
|
|
, prompt-toolkit
|
2020-04-24 23:36:52 +00:00
|
|
|
, pygments
|
2023-03-15 16:39:30 +00:00
|
|
|
, pyzmq
|
|
|
|
, traitlets
|
|
|
|
, flaky
|
|
|
|
, pexpect
|
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "jupyter_console";
|
2023-03-15 16:39:30 +00:00
|
|
|
version = "6.6.1";
|
|
|
|
format = "pyproject";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-WTEhLVy8H5Vvb9YVdVteFfOJqOqmlyiNu+Q3cBdhXsw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
hatchling
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
# use wrapped executable in tests
|
|
|
|
substituteInPlace jupyter_console/tests/test_console.py \
|
|
|
|
--replace "args = ['-m', 'jupyter_console', '--colors=NoColor']" "args = ['--colors=NoColor']" \
|
|
|
|
--replace "cmd = sys.executable" "cmd = '${placeholder "out"}/bin/jupyter-console'" \
|
|
|
|
--replace "check_output([sys.executable, '-m', 'jupyter_console'," "check_output(['${placeholder "out"}/bin/jupyter-console',"
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
ipykernel
|
2023-03-15 16:39:30 +00:00
|
|
|
ipython
|
|
|
|
jupyter-client
|
|
|
|
jupyter-core
|
2021-08-05 21:33:18 +00:00
|
|
|
prompt-toolkit
|
2020-04-24 23:36:52 +00:00
|
|
|
pygments
|
2023-03-15 16:39:30 +00:00
|
|
|
pyzmq
|
|
|
|
traitlets
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"jupyter_console"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
flaky
|
|
|
|
pexpect
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export HOME=$TMPDIR
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "Jupyter terminal console";
|
2023-03-15 16:39:30 +00:00
|
|
|
homepage = "https://github.com/jupyter/jupyter_console";
|
|
|
|
changelog = "https://github.com/jupyter/jupyter_console/releases/tag/v${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = lib.licenses.bsd3;
|
|
|
|
};
|
|
|
|
}
|