From 0995e22ad71a19ef6d7188617bddd71ee86f27c1 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Sat, 20 Jul 2024 10:58:19 +0200 Subject: [PATCH] python311Packages.dask-jobqueue: cleaning + fix on darwin --- .../python-modules/dask-jobqueue/default.nix | 52 ++++++++++++------- 1 file changed, 33 insertions(+), 19 deletions(-) diff --git a/pkgs/development/python-modules/dask-jobqueue/default.nix b/pkgs/development/python-modules/dask-jobqueue/default.nix index 9bf5bd2cab78..cfd372a8eb9d 100644 --- a/pkgs/development/python-modules/dask-jobqueue/default.nix +++ b/pkgs/development/python-modules/dask-jobqueue/default.nix @@ -1,34 +1,43 @@ { lib, buildPythonPackage, - cryptography, + pythonOlder, + pythonAtLeast, + fetchFromGitHub, + + # build-system + setuptools, + + # dependencies dask, distributed, - docrep, - fetchPypi, + + # checks + cryptography, pytest-asyncio, pytestCheckHook, - pythonAtLeast, - pythonOlder, }: buildPythonPackage rec { pname = "dask-jobqueue"; version = "0.8.5"; - format = "setuptools"; + pyproject = true; # Python 3.12 support should be added in 0.8.6 disabled = pythonOlder "3.8" || pythonAtLeast "3.12"; - src = fetchPypi { - inherit pname version; - hash = "sha256-9pI/nX/4lLlu+/cGEYss03/Td1HVZ+kcIt/T4uqpMgI="; + src = fetchFromGitHub { + owner = "dask"; + repo = "dask-jobqueue"; + rev = "refs/tags/${version}"; + hash = "sha256-NBFfPTNIXezwv7f1P3VRnkBYlOutD30+8rdiBBssHDE="; }; - propagatedBuildInputs = [ + build-system = [ setuptools ]; + + dependencies = [ dask distributed - docrep ]; nativeCheckInputs = [ @@ -38,17 +47,17 @@ buildPythonPackage rec { ]; disabledTests = [ - # Tests have additional requirements (e.g., sge, etc.) - "test_adapt_parameters" + # Require some unavailable pytest fixtures "test_adapt" + "test_adaptive" "test_adaptive_cores_mem" "test_adaptive_grouped" - "test_adaptive" + "test_adapt_parameters" "test_basic" "test_basic_scale_edge_cases" + "test_cluster" "test_cluster_error_scheduler_arguments_should_use_scheduler_options" "test_cluster_has_cores_and_memory" - "test_cluster" "test_command_template" "test_complex_cancel_command" "test_config" @@ -63,12 +72,15 @@ buildPythonPackage rec { "test_forward_ip" "test_import_scheduler_options_from_config" "test_job" + "test_jobqueue_job_call" "test_log_directory" "test_scale_cores_memory" "test_scale_grouped" - "test_scheduler_options_interface" "test_scheduler_options" + "test_scheduler_options_interface" "test_security" + "test_security_temporary" + "test_security_temporary_defaults" "test_shebang_settings" "test_use_stdin" "test_worker_name_uses_cluster_name" @@ -77,10 +89,12 @@ buildPythonPackage rec { pythonImportsCheck = [ "dask_jobqueue" ]; - meta = with lib; { + __darwinAllowLocalNetworking = true; + + meta = { description = "Deploy Dask on job schedulers like PBS, SLURM, and SGE"; homepage = "https://github.com/dask/dask-jobqueue"; - license = licenses.bsd3; - maintainers = with maintainers; [ ]; + license = lib.licenses.bsd3; + maintainers = with lib.maintainers; [ ]; }; }