diff options
author | Fabian Affolter <fabian@affolter-engineering.ch> | 2023-08-14 07:58:12 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-14 07:58:12 +0200 |
commit | f0a56023aca4c30c14883dd1eecd94633326c0b9 (patch) | |
tree | 29b9d202076e0af26f297987102191bf4568fa8c | |
parent | 6e287913f7b1ef537c97aa301b67c34ea46b640f (diff) | |
parent | e5458c636233a47279000cac18f44b901d2c2f93 (diff) |
Merge pull request #235828 from fabaff/jupyterhub-fix
python311Packages.jupyterhub: 1.5.0 -> 4.0.0
3 files changed, 89 insertions, 33 deletions
diff --git a/pkgs/development/python-modules/batchspawner/default.nix b/pkgs/development/python-modules/batchspawner/default.nix index 70c64827a8cae..f2e8acfe7a0e3 100644 --- a/pkgs/development/python-modules/batchspawner/default.nix +++ b/pkgs/development/python-modules/batchspawner/default.nix @@ -2,6 +2,7 @@ , buildPythonPackage , fetchFromGitHub , jupyterhub +, packaging , pythonOlder }: @@ -21,6 +22,7 @@ buildPythonPackage rec { propagatedBuildInputs = [ jupyterhub + packaging ]; # Tests require a job scheduler e.g. slurm, pbs, etc. @@ -32,8 +34,9 @@ buildPythonPackage rec { meta = with lib; { description = "A spawner for Jupyterhub to spawn notebooks using batch resource managers"; - homepage = "https://jupyter.org"; + homepage = "https://github.com/jupyterhub/batchspawner"; + changelog = "https://github.com/jupyterhub/batchspawner/blob/v${version}/CHANGELOG.md"; license = licenses.bsd3; - maintainers = [ ]; + maintainers = with maintainers; [ ]; }; } diff --git a/pkgs/development/python-modules/jupyterhub-systemdspawner/default.nix b/pkgs/development/python-modules/jupyterhub-systemdspawner/default.nix index 9907122b11357..409539ccb4a73 100644 --- a/pkgs/development/python-modules/jupyterhub-systemdspawner/default.nix +++ b/pkgs/development/python-modules/jupyterhub-systemdspawner/default.nix @@ -1,29 +1,26 @@ { lib +, bash , buildPythonPackage , fetchFromGitHub , jupyterhub +, pythonOlder , tornado -, bash }: buildPythonPackage rec { pname = "jupyterhub-systemdspawner"; - version = "0.15"; + version = "1.0.1"; + format = "setuptools"; + + disabled = pythonOlder "3.8"; src = fetchFromGitHub { owner = "jupyterhub"; repo = "systemdspawner"; - rev = "v${version}"; - hash = "sha256-EUCA+CKCeYr+cLVrqTqe3Q32JkbqeALL6tfOnlVHk8Q="; + rev = "refs/tags/v${version}"; + hash = "sha256-2Pxswa472umovHBUVTIX1l+Glj6bzzgBLsu+p4IA6jA="; }; - propagatedBuildInputs = [ - jupyterhub - tornado - ]; - - buildInputs = [ bash ]; - postPatch = '' substituteInPlace systemdspawner/systemd.py \ --replace "/bin/bash" "${bash}/bin/bash" @@ -32,7 +29,16 @@ buildPythonPackage rec { --replace "/bin/bash" "${bash}/bin/bash" ''; - # no tests + buildInputs = [ + bash + ]; + + propagatedBuildInputs = [ + jupyterhub + tornado + ]; + + # Module has no tests doCheck = false; postInstall = '' @@ -41,9 +47,14 @@ buildPythonPackage rec { patchShebangs $out/bin ''; + pythonImportsCheck = [ + "systemdspawner" + ]; + meta = with lib; { description = "JupyterHub Spawner using systemd for resource isolation"; homepage = "https://github.com/jupyterhub/systemdspawner"; + changelog = "https://github.com/jupyterhub/systemdspawner/blob/v${version}/CHANGELOG.md"; license = licenses.bsd3; maintainers = with maintainers; [ ]; }; diff --git a/pkgs/development/python-modules/jupyterhub/default.nix b/pkgs/development/python-modules/jupyterhub/default.nix index b1bb40ad70f71..7b6a1d0522dc6 100644 --- a/pkgs/development/python-modules/jupyterhub/default.nix +++ b/pkgs/development/python-modules/jupyterhub/default.nix @@ -1,30 +1,38 @@ { lib , stdenv -, buildPythonPackage -, pythonOlder -, fetchPypi -, fetchzip , alembic , async-generator +, beautifulsoup4 +, buildPythonPackage , certipy -, python-dateutil +, cryptography , entrypoints +, fetchPypi +, fetchzip +, importlib-metadata , jinja2 +, jsonschema , jupyter-telemetry +, jupyterlab +, mock +, nbclassic +, nodePackages +, notebook , oauthlib +, packaging , pamela +, playwright , prometheus-client +, pytest-asyncio +, pytestCheckHook +, python-dateutil +, pythonOlder , requests +, requests-mock +, selenium , sqlalchemy , tornado , traitlets -, nodePackages -, beautifulsoup4 -, cryptography -, notebook -, pytest-asyncio -, pytestCheckHook -, requests-mock , virtualenv }: @@ -61,12 +69,14 @@ in buildPythonPackage rec { pname = "jupyterhub"; - version = "1.5.0"; - disabled = pythonOlder "3.6"; + version = "4.0.1"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - hash = "sha256-3GGPZXwjukYoDjYlflCTGAZnS6Dp5kmK+wke/GIm1p0="; + hash = "sha256-jig/9Z5cQBZxIHfSVJ7XSs2RWjKDb+ACGGeKh4G9ft4="; }; # Most of this only applies when building from source (e.g. js/css assets are @@ -111,7 +121,6 @@ buildPythonPackage rec { ''; propagatedBuildInputs = [ - # https://github.com/jupyterhub/jupyterhub/blob/master/requirements.txt alembic async-generator certipy @@ -120,12 +129,16 @@ buildPythonPackage rec { jinja2 jupyter-telemetry oauthlib + packaging pamela prometheus-client requests + selenium sqlalchemy tornado traitlets + ] ++ lib.optionals (pythonOlder "3.10") [ + importlib-metadata ]; preCheck = '' @@ -134,10 +147,14 @@ buildPythonPackage rec { ''; nativeCheckInputs = [ - # https://github.com/jupyterhub/jupyterhub/blob/master/dev-requirements.txt beautifulsoup4 cryptography notebook + jsonschema + nbclassic + mock + jupyterlab + playwright pytest-asyncio pytestCheckHook requests-mock @@ -151,14 +168,39 @@ buildPythonPackage rec { "test_external_service" # attempts to do ssl connection "test_connection_notebook_wrong_certs" + # AttributeError: 'coroutine' object... + "test_valid_events" + "test_invalid_events" + "test_user_group_roles" + ]; + + disabledTestPaths = [ + # Not testing with a running instance + # AttributeError: 'coroutine' object has no attribute 'db' + "docs/test_docs.py" + "jupyterhub/tests/browser/test_browser.py" + "jupyterhub/tests/test_api.py" + "jupyterhub/tests/test_auth_expiry.py" + "jupyterhub/tests/test_auth.py" + "jupyterhub/tests/test_metrics.py" + "jupyterhub/tests/test_named_servers.py" + "jupyterhub/tests/test_orm.py" + "jupyterhub/tests/test_pages.py" + "jupyterhub/tests/test_proxy.py" + "jupyterhub/tests/test_scopes.py" + "jupyterhub/tests/test_services_auth.py" + "jupyterhub/tests/test_singleuser.py" + "jupyterhub/tests/test_spawner.py" + "jupyterhub/tests/test_user.py" ]; meta = with lib; { - broken = lib.versionAtLeast sqlalchemy.version "2.0"; description = "Serves multiple Jupyter notebook instances"; homepage = "https://jupyter.org/"; - changelog = "https://github.com/jupyterhub/jupyterhub/blob/${version}/docs/source/changelog.md"; + changelog = "https://github.com/jupyterhub/jupyterhub/blob/${version}/docs/source/reference/changelog.md"; license = licenses.bsd3; maintainers = with maintainers; [ ixxie cstrahan ]; + # darwin: E OSError: dlopen(/nix/store/43zml0mlr17r5jsagxr00xxx91hz9lky-openpam-20170430/lib/libpam.so, 6): image not found + broken = (stdenv.isLinux && stdenv.isAarch64) || stdenv.isDarwin; }; } |