From 05d45e9fbb41758e3488c32ef5d9730b26ee95a9 Mon Sep 17 00:00:00 2001 From: Enno Richter Date: Tue, 29 Dec 2020 08:55:54 +0100 Subject: [PATCH 1/5] pythonPackages.jupyter-packaging: init at 0.7.12 --- .../jupyter-packaging/default.nix | 38 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 40 insertions(+) create mode 100644 pkgs/development/python-modules/jupyter-packaging/default.nix diff --git a/pkgs/development/python-modules/jupyter-packaging/default.nix b/pkgs/development/python-modules/jupyter-packaging/default.nix new file mode 100644 index 000000000000..fdc28f08ef4b --- /dev/null +++ b/pkgs/development/python-modules/jupyter-packaging/default.nix @@ -0,0 +1,38 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pythonOlder +, packaging +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "jupyter-packaging"; + version = "0.7.12"; + disabled = pythonOlder "3.7"; + + src = fetchPypi { + inherit pname version; + sha256 = "sha256-sUAyV3GIGn33t/LRSZe2GQY/51rnVrkCWFLkNGAAu7g="; + }; + + propagatedBuildInputs = [ packaging ]; + + checkInputs = [ pytestCheckHook ]; + + preCheck = '' + export HOME=$(mktemp -d) + ''; + + # disable tests depending on network connection + disabledTests = [ "test_develop" "test_install" ]; + + pythonImportsCheck = [ "jupyter_packaging" ]; + + meta = with lib; { + description = "Jupyter Packaging Utilities"; + homepage = "https://github.com/jupyter/jupyter-packaging"; + license = licenses.bsd3; + maintainers = [ maintainers.elohmeier ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 2c65295c0970..56f5e5d0a2ca 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3562,6 +3562,8 @@ in { jupyterlab_server = callPackage ../development/python-modules/jupyterlab_server { }; + jupyter-packaging = callPackage ../development/python-modules/jupyter-packaging { }; + jupyter-repo2docker = callPackage ../development/python-modules/jupyter-repo2docker { pkgs-docker = pkgs.docker; }; From d9728515e637b48fe90f60c267146725e53869eb Mon Sep 17 00:00:00 2001 From: Enno Richter Date: Tue, 29 Dec 2020 08:56:22 +0100 Subject: [PATCH 2/5] pythonPackages.jupyter_server: init at 1.4.1 --- .../python-modules/jupyter_server/default.nix | 75 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 77 insertions(+) create mode 100644 pkgs/development/python-modules/jupyter_server/default.nix diff --git a/pkgs/development/python-modules/jupyter_server/default.nix b/pkgs/development/python-modules/jupyter_server/default.nix new file mode 100644 index 000000000000..a9f98781b4fb --- /dev/null +++ b/pkgs/development/python-modules/jupyter_server/default.nix @@ -0,0 +1,75 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pythonOlder +, pytestCheckHook +, pytest-tornasync +, jinja2 +, tornado +, pyzmq +, ipython_genutils +, traitlets +, jupyter_core +, jupyter_client +, nbformat +, nbconvert +, send2trash +, terminado +, prometheus_client +, anyio +, requests +}: + +buildPythonPackage rec { + pname = "jupyter_server"; + version = "1.4.1"; + disabled = pythonOlder "3.6"; + + src = fetchPypi { + inherit pname version; + sha256 = "sha256-sBJvI39nlTPuxGJEz8ZtYeOh+OwPrS1HNS+hnT51Tkc="; + }; + + postPatch = '' + substituteInPlace setup.py \ + --replace "anyio>=2.0.2" "anyio" + ''; + + propagatedBuildInputs = [ + jinja2 + tornado + pyzmq + ipython_genutils + traitlets + jupyter_core + jupyter_client + nbformat + nbconvert + send2trash + terminado + prometheus_client + anyio + ]; + + checkInputs = [ + pytestCheckHook + pytest-tornasync + requests + ]; + + preCheck = '' + export HOME=$(mktemp -d) + ''; + + pytestFlagsArray = [ "jupyter_server/tests/" ]; + + # disabled failing tests + disabledTests = [ "test_server_extension_list" "test_list_formats" "test_base_url" ]; + + meta = with lib; { + description = "The backend—i.e. core services, APIs, and REST endpoints—to Jupyter web applications."; + homepage = "https://github.com/jupyter-server/jupyter_server"; + license = licenses.bsdOriginal; + maintainers = [ maintainers.elohmeier ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 56f5e5d0a2ca..6650e4dbb696 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3544,6 +3544,8 @@ in { jupyter_core = callPackage ../development/python-modules/jupyter_core { }; + jupyter_server = callPackage ../development/python-modules/jupyter_server { }; + jupyterhub = callPackage ../development/python-modules/jupyterhub { }; jupyterhub-ldapauthenticator = callPackage ../development/python-modules/jupyterhub-ldapauthenticator { }; From 4d49cdc0cff2bf7637284668aa41e01f7e125135 Mon Sep 17 00:00:00 2001 From: Enno Richter Date: Tue, 29 Dec 2020 08:58:30 +0100 Subject: [PATCH 3/5] nbclassic: init at 0.2.6 --- .../python-modules/nbclassic/default.nix | 37 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 39 insertions(+) create mode 100644 pkgs/development/python-modules/nbclassic/default.nix diff --git a/pkgs/development/python-modules/nbclassic/default.nix b/pkgs/development/python-modules/nbclassic/default.nix new file mode 100644 index 000000000000..3644b4e48dd7 --- /dev/null +++ b/pkgs/development/python-modules/nbclassic/default.nix @@ -0,0 +1,37 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, notebook +, pythonOlder +, jupyter_server +, pytestCheckHook +, pytest-tornasync +}: + +buildPythonPackage rec { + pname = "nbclassic"; + version = "0.2.6"; + disabled = pythonOlder "3.5"; + + # tests only on github + src = fetchFromGitHub { + owner = "jupyterlab"; + repo = pname; + rev = version; + sha256 = "sha256-stp0LZJAOCrnObvJIPEVt8mMb8yL29nlHECypbTg3ec="; + }; + + propagatedBuildInputs = [ jupyter_server notebook ]; + + checkInputs = [ + pytestCheckHook + pytest-tornasync + ]; + + meta = with lib; { + description = "Jupyter lab environment notebook server extension."; + license = with licenses; [ bsd3 ]; + homepage = "https://github.com/jupyterlab/nbclassic"; + maintainers = [ maintainers.elohmeier ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 6650e4dbb696..555c222bc0e0 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4467,6 +4467,8 @@ in { naturalsort = callPackage ../development/python-modules/naturalsort { }; + nbclassic = callPackage ../development/python-modules/nbclassic { }; + nbclient = callPackage ../development/python-modules/nbclient { }; nbconflux = callPackage ../development/python-modules/nbconflux { }; From 5de6e55c9e652cb581bbf5a910832bb38dc099cd Mon Sep 17 00:00:00 2001 From: Enno Richter Date: Tue, 29 Dec 2020 09:00:53 +0100 Subject: [PATCH 4/5] pythonPackages.jupyterlab_server: 1.2.0 -> 2.3.0 --- .../jupyterlab_server/default.nix | 35 ++++++++++++------- 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/jupyterlab_server/default.nix b/pkgs/development/python-modules/jupyterlab_server/default.nix index 3d9b5b9f831b..c110cc0590fe 100644 --- a/pkgs/development/python-modules/jupyterlab_server/default.nix +++ b/pkgs/development/python-modules/jupyterlab_server/default.nix @@ -1,34 +1,45 @@ { lib , buildPythonPackage , fetchPypi -, notebook , jsonschema , pythonOlder , requests -, pytest +, pytestCheckHook , pyjson5 +, Babel +, jupyter_server +, pytest-tornasync +, pytestcov +, strict-rfc3339 }: buildPythonPackage rec { pname = "jupyterlab_server"; - version = "1.2.0"; + version = "2.3.0"; disabled = pythonOlder "3.5"; src = fetchPypi { inherit pname version; - sha256 = "5431d9dde96659364b7cc877693d5d21e7b80cea7ae3959ecc2b87518e5f5d8c"; + sha256 = "sha256-56AkWqPeI6GAPeLv9AHkykWUU42fWYBhNPMEGabYtqM="; }; - checkInputs = [ requests pytest ]; - propagatedBuildInputs = [ notebook jsonschema pyjson5 ]; + propagatedBuildInputs = [ requests jsonschema pyjson5 Babel jupyter_server ]; - # test_listing test fails - # this is a new package and not all tests pass - doCheck = false; + checkInputs = [ + pytestCheckHook + pytest-tornasync + pytestcov + strict-rfc3339 + ]; - checkPhase = '' - pytest - ''; + disabledTests = [ + "test_get_locale" + "test_get_installed_language_pack_locales_passes" + "test_get_installed_package_locales" + "test_get_installed_packages_locale" + "test_get_language_packs" + "test_get_language_pack" + ]; meta = with lib; { description = "JupyterLab Server"; From 26e414ebd0906afe888dd20f8ce36bc8712bca52 Mon Sep 17 00:00:00 2001 From: Enno Richter Date: Tue, 29 Dec 2020 09:13:17 +0100 Subject: [PATCH 5/5] python3Packages.jupyterlab: 2.2.9 -> 3.0.11 --- pkgs/development/python-modules/jupyterlab/default.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/jupyterlab/default.nix b/pkgs/development/python-modules/jupyterlab/default.nix index ff725ce18297..81ad668db08f 100644 --- a/pkgs/development/python-modules/jupyterlab/default.nix +++ b/pkgs/development/python-modules/jupyterlab/default.nix @@ -4,19 +4,21 @@ , jupyterlab_server , notebook , pythonOlder +, jupyter-packaging +, nbclassic }: buildPythonPackage rec { pname = "jupyterlab"; - version = "2.2.9"; + version = "3.0.11"; disabled = pythonOlder "3.5"; src = fetchPypi { inherit pname version; - sha256 = "3be8f8edea173753dd838c1b6d3bbcb6f5c801121f824a477025c1b6a1d33dc6"; + sha256 = "sha256-zkz08xFjzlGu0BPAGoV8BdQ6k8Ru1pAWbkhkT255R94="; }; - propagatedBuildInputs = [ jupyterlab_server notebook ]; + propagatedBuildInputs = [ jupyterlab_server notebook jupyter-packaging nbclassic ]; makeWrapperArgs = [ "--set" "JUPYTERLAB_DIR" "$out/share/jupyter/lab"