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

78 lines
1.6 KiB
Nix
Raw Normal View History

{ stdenv
, lib
, buildPythonPackage
, fetchPypi
, nose
2017-10-23 13:40:02 +02:00
, nose_warnings_filters
, glibcLocales
2017-10-23 13:40:02 +02:00
, isPy3k
, mock
, jinja2
, tornado
, ipython_genutils
, traitlets
, jupyter_core
, jupyter_client
, nbformat
, nbconvert
, ipykernel
, terminado
, requests
2018-01-16 22:08:03 +01:00
, send2trash
, pexpect
2018-07-28 16:43:01 +02:00
, prometheus_client
}:
buildPythonPackage rec {
pname = "notebook";
2020-02-06 10:16:04 +01:00
version = "6.0.3";
disabled = !isPy3k;
src = fetchPypi {
inherit pname version;
2020-02-06 10:16:04 +01:00
sha256 = "47a9092975c9e7965ada00b9a20f0cf637d001db60d241d479f53c0be117ad48";
};
2017-10-23 13:40:02 +02:00
LC_ALL = "en_US.utf8";
checkInputs = [ nose glibcLocales ]
2017-10-23 13:40:02 +02:00
++ (if isPy3k then [ nose_warnings_filters ] else [ mock ]);
2017-10-23 13:40:02 +02:00
propagatedBuildInputs = [
2018-01-16 22:08:03 +01:00
jinja2 tornado ipython_genutils traitlets jupyter_core send2trash
2017-10-23 13:40:02 +02:00
jupyter_client nbformat nbconvert ipykernel terminado requests pexpect
2018-07-28 16:43:01 +02:00
prometheus_client
2017-10-23 13:40:02 +02:00
];
2017-10-23 13:40:02 +02:00
# disable warning_filters
preCheck = lib.optionalString (!isPy3k) ''
echo "" > setup.cfg
2017-10-23 13:40:02 +02:00
'';
2018-06-22 12:46:13 +02:00
postPatch = ''
# Remove selenium tests
rm -rf notebook/tests/selenium
'';
checkPhase = ''
2017-10-23 13:40:02 +02:00
runHook preCheck
mkdir tmp
HOME=tmp nosetests -v ${if (stdenv.isDarwin) then ''
--exclude test_delete \
--exclude test_checkpoints_follow_file
''
else ""}
'';
2019-09-14 21:20:54 +02: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 13:40:02 +02:00
}