nixpkgs/pkgs/development/python-modules/notebook/default.nix

86 lines
1.9 KiB
Nix
Raw Normal View History

{ stdenv
, lib
, buildPythonPackage
, fetchPypi
2020-08-17 02:11:12 +00:00
, argon2_cffi
, nose
2017-10-23 11:40:02 +00:00
, nose_warnings_filters
, glibcLocales
2017-10-23 11:40:02 +00:00
, isPy3k
, mock
, jinja2
, tornado
, ipython_genutils
, traitlets
, jupyter_core
, jupyter_client
, nbformat
, nbconvert
, ipykernel
, terminado
, requests
2018-01-16 21:08:03 +00:00
, send2trash
, pexpect
2018-07-28 14:43:01 +00:00
, prometheus_client
2020-08-17 02:11:12 +00:00
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "notebook";
version = "6.3.0";
disabled = !isPy3k;
src = fetchPypi {
inherit pname version;
sha256 = "cbc9398d6c81473e9cdb891d2cae9c0d3718fca289dda6d26df5cb660fcadc7d";
};
2017-10-23 11:40:02 +00:00
LC_ALL = "en_US.utf8";
2020-08-17 02:11:12 +00:00
checkInputs = [ nose pytestCheckHook glibcLocales ]
2017-10-23 11:40:02 +00:00
++ (if isPy3k then [ nose_warnings_filters ] else [ mock ]);
2017-10-23 11:40:02 +00:00
propagatedBuildInputs = [
2018-01-16 21:08:03 +00:00
jinja2 tornado ipython_genutils traitlets jupyter_core send2trash
2017-10-23 11:40:02 +00:00
jupyter_client nbformat nbconvert ipykernel terminado requests pexpect
2020-08-17 02:11:12 +00:00
prometheus_client argon2_cffi
2017-10-23 11:40:02 +00:00
];
2017-10-23 11:40:02 +00:00
# disable warning_filters
preCheck = lib.optionalString (!isPy3k) ''
echo "" > setup.cfg
2017-10-23 11:40:02 +00:00
'';
2018-06-22 10:46:13 +00:00
postPatch = ''
# Remove selenium tests
rm -rf notebook/tests/selenium
2020-08-17 02:11:12 +00:00
export HOME=$TMPDIR
2018-06-22 10:46:13 +00:00
'';
2020-08-17 02:11:12 +00:00
disabledTests = [
# a "system_config" is generated, and fails many tests
"config"
"load_ordered"
# requires jupyter, but will cause circular imports
"test_run"
"TestInstallServerExtension"
"launch_socket"
"sock_server"
2020-11-29 23:04:20 +00:00
"test_list_formats" # tries to find python MIME type
"KernelCullingTest" # has a race condition failing on slower hardware
2020-09-23 05:52:18 +00:00
] ++ lib.optional stdenv.isDarwin [
"test_delete"
2020-09-23 05:52:18 +00:00
"test_checkpoints_follow_file"
2020-08-17 02:11:12 +00:00
];
2019-09-14 19:20:54 +00:00
# Some of the tests use localhost networking.
__darwinAllowLocalNetworking = true;
meta = {
description = "The Jupyter HTML notebook is a web-based notebook environment for interactive computing";
homepage = "https://jupyter.org/";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ fridh ];
};
2017-10-23 11:40:02 +00:00
}