2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
2021-05-20 23:08:51 +00:00
|
|
|
, stdenv
|
2023-02-16 17:41:37 +00:00
|
|
|
, arrow-cpp
|
2020-04-24 23:36:52 +00:00
|
|
|
, bokeh
|
|
|
|
, buildPythonPackage
|
2022-11-04 12:27:35 +00:00
|
|
|
, click
|
2021-09-18 10:52:07 +00:00
|
|
|
, cloudpickle
|
|
|
|
, distributed
|
2022-06-26 10:26:21 +00:00
|
|
|
, fastparquet
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchFromGitHub
|
2021-12-06 16:07:01 +00:00
|
|
|
, fetchpatch
|
2020-04-24 23:36:52 +00:00
|
|
|
, fsspec
|
2023-05-24 13:37:59 +00:00
|
|
|
, importlib-metadata
|
2021-09-18 10:52:07 +00:00
|
|
|
, jinja2
|
2020-04-24 23:36:52 +00:00
|
|
|
, numpy
|
2021-09-18 10:52:07 +00:00
|
|
|
, packaging
|
2020-04-24 23:36:52 +00:00
|
|
|
, pandas
|
|
|
|
, partd
|
2022-06-26 10:26:21 +00:00
|
|
|
, pyarrow
|
2021-09-18 10:52:07 +00:00
|
|
|
, pytest-rerunfailures
|
2021-03-09 03:18:52 +00:00
|
|
|
, pytest-xdist
|
2021-09-18 10:52:07 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, pyyaml
|
2022-06-26 10:26:21 +00:00
|
|
|
, scipy
|
2023-05-24 13:37:59 +00:00
|
|
|
, setuptools
|
2021-09-18 10:52:07 +00:00
|
|
|
, toolz
|
2023-05-24 13:37:59 +00:00
|
|
|
, versioneer
|
2022-06-26 10:26:21 +00:00
|
|
|
, zarr
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "dask";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "2023.4.1";
|
2021-09-18 10:52:07 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2022-11-04 12:27:35 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dask";
|
|
|
|
repo = pname;
|
2023-05-24 13:37:59 +00:00
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-PkEFXF6OFZU+EMFBUopv84WniQghr5Q6757Qx6D5MyE=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
versioneer
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
2022-11-04 12:27:35 +00:00
|
|
|
click
|
2020-04-24 23:36:52 +00:00
|
|
|
cloudpickle
|
|
|
|
fsspec
|
2021-09-18 10:52:07 +00:00
|
|
|
packaging
|
2020-04-24 23:36:52 +00:00
|
|
|
partd
|
2021-09-18 10:52:07 +00:00
|
|
|
pyyaml
|
2023-05-24 13:37:59 +00:00
|
|
|
importlib-metadata
|
2020-04-24 23:36:52 +00:00
|
|
|
toolz
|
|
|
|
];
|
|
|
|
|
2022-06-26 10:26:21 +00:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
array = [
|
|
|
|
numpy
|
|
|
|
];
|
|
|
|
complete = [
|
|
|
|
distributed
|
|
|
|
];
|
|
|
|
dataframe = [
|
|
|
|
numpy
|
|
|
|
pandas
|
|
|
|
];
|
|
|
|
distributed = [
|
|
|
|
distributed
|
|
|
|
];
|
|
|
|
diagnostics = [
|
|
|
|
bokeh
|
|
|
|
jinja2
|
|
|
|
];
|
|
|
|
};
|
2021-03-09 03:18:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-03-09 03:18:52 +00:00
|
|
|
pytestCheckHook
|
|
|
|
pytest-rerunfailures
|
|
|
|
pytest-xdist
|
2022-06-26 10:26:21 +00:00
|
|
|
scipy
|
|
|
|
zarr
|
2023-02-16 17:41:37 +00:00
|
|
|
] ++ lib.optionals (!arrow-cpp.meta.broken) [ # support is sparse on aarch64
|
|
|
|
fastparquet
|
|
|
|
pyarrow
|
2021-03-09 03:18:52 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
dontUseSetuptoolsCheck = true;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
postPatch = ''
|
2022-06-26 10:26:21 +00:00
|
|
|
# versioneer hack to set version of GitHub package
|
2020-04-24 23:36:52 +00:00
|
|
|
echo "def get_versions(): return {'dirty': False, 'error': None, 'full-revisionid': None, 'version': '${version}'}" > dask/_version.py
|
|
|
|
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "version=versioneer.get_version()," "version='${version}'," \
|
|
|
|
--replace "cmdclass=versioneer.get_cmdclass()," ""
|
2022-06-26 10:26:21 +00:00
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
substituteInPlace pyproject.toml \
|
2022-06-26 10:26:21 +00:00
|
|
|
--replace " --durations=10" "" \
|
2023-05-24 13:37:59 +00:00
|
|
|
--replace " --cov-config=pyproject.toml" "" \
|
2022-06-26 10:26:21 +00:00
|
|
|
--replace " -v" ""
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-05-03 20:48:10 +00:00
|
|
|
pytestFlagsArray = [
|
2022-06-26 10:26:21 +00:00
|
|
|
# Rerun failed tests up to three times
|
2021-09-18 10:52:07 +00:00
|
|
|
"--reruns 3"
|
2022-06-26 10:26:21 +00:00
|
|
|
# Don't run tests that require network access
|
2021-05-03 20:48:10 +00:00
|
|
|
"-m 'not network'"
|
|
|
|
];
|
2020-10-07 09:15:18 +00:00
|
|
|
|
2021-05-20 23:08:51 +00:00
|
|
|
disabledTests = lib.optionals stdenv.isDarwin [
|
2022-06-26 10:26:21 +00:00
|
|
|
# Test requires features of python3Packages.psutil that are
|
2021-04-25 03:57:28 +00:00
|
|
|
# blocked in sandboxed-builds
|
|
|
|
"test_auto_blocksize_csv"
|
2022-06-26 10:26:21 +00:00
|
|
|
# AttributeError: 'str' object has no attribute 'decode'
|
|
|
|
"test_read_dir_nometa"
|
2021-06-28 23:13:55 +00:00
|
|
|
] ++ [
|
2022-06-26 10:26:21 +00:00
|
|
|
"test_chunksize_files"
|
2022-11-04 12:27:35 +00:00
|
|
|
# TypeError: 'ArrowStringArray' with dtype string does not support reduction 'min'
|
|
|
|
"test_set_index_string"
|
2023-03-15 16:39:30 +00:00
|
|
|
# numpy 1.24
|
|
|
|
# RuntimeWarning: invalid value encountered in cast
|
|
|
|
"test_setitem_extended_API_2d_mask"
|
2020-05-15 21:57:56 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-05-03 20:48:10 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"dask"
|
|
|
|
"dask.array"
|
|
|
|
"dask.bag"
|
|
|
|
"dask.bytes"
|
|
|
|
"dask.dataframe"
|
|
|
|
"dask.dataframe.io"
|
|
|
|
"dask.dataframe.tseries"
|
|
|
|
"dask.diagnostics"
|
|
|
|
];
|
2021-04-25 03:57:28 +00:00
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Minimal task scheduling abstraction";
|
2020-10-27 00:29:36 +00:00
|
|
|
homepage = "https://dask.org/";
|
|
|
|
changelog = "https://docs.dask.org/en/latest/changelog.html";
|
2021-03-09 03:18:52 +00:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ fridh ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|