aboutsummaryrefslogtreecommitdiff
path: root/infra/libkookie/nixpkgs/pkgs/development/python-modules/notebook
diff options
context:
space:
mode:
authorMx Kookie <kookie@spacekookie.de>2020-10-31 19:35:09 +0100
committerMx Kookie <kookie@spacekookie.de>2020-10-31 19:35:09 +0100
commitc4625b175f8200f643fd6e11010932ea44c78433 (patch)
treebce3f89888c8ac3991fa5569a878a9eab6801ccc /infra/libkookie/nixpkgs/pkgs/development/python-modules/notebook
parent49f735974dd103039ddc4cb576bb76555164a9e7 (diff)
parentd661aa56a8843e991261510c1bb28fdc2f6975ae (diff)
Add 'infra/libkookie/' from commit 'd661aa56a8843e991261510c1bb28fdc2f6975ae'
git-subtree-dir: infra/libkookie git-subtree-mainline: 49f735974dd103039ddc4cb576bb76555164a9e7 git-subtree-split: d661aa56a8843e991261510c1bb28fdc2f6975ae
Diffstat (limited to 'infra/libkookie/nixpkgs/pkgs/development/python-modules/notebook')
-rw-r--r--infra/libkookie/nixpkgs/pkgs/development/python-modules/notebook/2.nix76
-rw-r--r--infra/libkookie/nixpkgs/pkgs/development/python-modules/notebook/default.nix84
2 files changed, 160 insertions, 0 deletions
diff --git a/infra/libkookie/nixpkgs/pkgs/development/python-modules/notebook/2.nix b/infra/libkookie/nixpkgs/pkgs/development/python-modules/notebook/2.nix
new file mode 100644
index 000000000000..0e5cfdf43971
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/development/python-modules/notebook/2.nix
@@ -0,0 +1,76 @@
+{ stdenv
+, lib
+, buildPythonPackage
+, fetchPypi
+, nose
+, nose_warnings_filters
+, glibcLocales
+, isPy3k
+, mock
+, jinja2
+, tornado
+, ipython_genutils
+, traitlets
+, jupyter_core
+, jupyter_client
+, nbformat
+, nbconvert
+, ipykernel
+, terminado
+, requests
+, send2trash
+, pexpect
+, prometheus_client
+}:
+
+buildPythonPackage rec {
+ pname = "notebook";
+ version = "5.7.10";
+
+ src = fetchPypi {
+ inherit pname version;
+ sha256 = "b10107e1438e7a564292aa32510e610c88844cae03c882fe5286b891792b5c11";
+ };
+
+ LC_ALL = "en_US.utf8";
+
+ checkInputs = [ nose glibcLocales ]
+ ++ (if isPy3k then [ nose_warnings_filters ] else [ mock ]);
+
+ propagatedBuildInputs = [
+ jinja2 tornado ipython_genutils traitlets jupyter_core send2trash
+ jupyter_client nbformat nbconvert ipykernel terminado requests pexpect
+ prometheus_client
+ ];
+
+ # disable warning_filters
+ preCheck = lib.optionalString (!isPy3k) ''
+ echo "" > setup.cfg
+ '';
+
+ postPatch = ''
+ # Remove selenium tests
+ rm -rf notebook/tests/selenium
+
+ '';
+
+ checkPhase = ''
+ runHook preCheck
+ mkdir tmp
+ HOME=tmp nosetests -v ${if (stdenv.isDarwin) then ''
+ --exclude test_delete \
+ --exclude test_checkpoints_follow_file
+ ''
+ else ""}
+ '';
+
+ # 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; [ ];
+ };
+}
diff --git a/infra/libkookie/nixpkgs/pkgs/development/python-modules/notebook/default.nix b/infra/libkookie/nixpkgs/pkgs/development/python-modules/notebook/default.nix
new file mode 100644
index 000000000000..04fe19377f8e
--- /dev/null
+++ b/infra/libkookie/nixpkgs/pkgs/development/python-modules/notebook/default.nix
@@ -0,0 +1,84 @@
+{ stdenv
+, lib
+, buildPythonPackage
+, fetchPypi
+, argon2_cffi
+, nose
+, nose_warnings_filters
+, glibcLocales
+, isPy3k
+, mock
+, jinja2
+, tornado
+, ipython_genutils
+, traitlets
+, jupyter
+, jupyter_core
+, jupyter_client
+, nbformat
+, nbconvert
+, ipykernel
+, terminado
+, requests
+, send2trash
+, pexpect
+, prometheus_client
+, pytestCheckHook
+}:
+
+buildPythonPackage rec {
+ pname = "notebook";
+ version = "6.1.4";
+ disabled = !isPy3k;
+
+ src = fetchPypi {
+ inherit pname version;
+ sha256 = "0cnyi4zd3byh7zixdj2q71axm31xgjiyfklh1c63c87acgwh2zb8";
+ };
+
+ LC_ALL = "en_US.utf8";
+
+ checkInputs = [ nose pytestCheckHook glibcLocales ]
+ ++ (if isPy3k then [ nose_warnings_filters ] else [ mock ]);
+
+ propagatedBuildInputs = [
+ jinja2 tornado ipython_genutils traitlets jupyter_core send2trash
+ jupyter_client nbformat nbconvert ipykernel terminado requests pexpect
+ prometheus_client argon2_cffi
+ ];
+
+ # disable warning_filters
+ preCheck = lib.optionalString (!isPy3k) ''
+ echo "" > setup.cfg
+ '';
+
+ postPatch = ''
+ # Remove selenium tests
+ rm -rf notebook/tests/selenium
+ export HOME=$TMPDIR
+ '';
+
+ 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"
+ ] ++ lib.optional stdenv.isDarwin [
+ "test_delete"
+ "test_checkpoints_follow_file"
+ ];
+
+ # 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 ];
+ };
+}