2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
2021-05-20 23:08:51 +00:00
|
|
|
, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
2023-08-10 07:59:29 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
# build-system
|
2023-08-10 07:59:29 +00:00
|
|
|
, setuptools
|
2023-08-22 20:05:09 +00:00
|
|
|
, wheel
|
2023-08-10 07:59:29 +00:00
|
|
|
|
|
|
|
# dependencies
|
2022-11-04 12:27:35 +00:00
|
|
|
, click
|
2021-09-18 10:52:07 +00:00
|
|
|
, cloudpickle
|
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
|
|
|
, packaging
|
2020-04-24 23:36:52 +00:00
|
|
|
, partd
|
2023-08-10 07:59:29 +00:00
|
|
|
, pyyaml
|
|
|
|
, toolz
|
|
|
|
|
|
|
|
# optional-dependencies
|
|
|
|
, numpy
|
2022-06-26 10:26:21 +00:00
|
|
|
, pyarrow
|
2023-08-10 07:59:29 +00:00
|
|
|
, lz4
|
|
|
|
, pandas
|
|
|
|
, distributed
|
|
|
|
, bokeh
|
|
|
|
, jinja2
|
|
|
|
|
|
|
|
# tests
|
|
|
|
, arrow-cpp
|
|
|
|
, hypothesis
|
|
|
|
, pytest-asyncio
|
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
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "dask";
|
2023-08-22 20:05:09 +00:00
|
|
|
version = "2023.8.0";
|
2023-08-10 07:59:29 +00:00
|
|
|
format = "pyproject";
|
2021-09-18 10:52:07 +00:00
|
|
|
|
2022-11-04 12:27:35 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dask";
|
2023-08-10 07:59:29 +00:00
|
|
|
repo = "dask";
|
2023-05-24 13:37:59 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2023-08-22 20:05:09 +00:00
|
|
|
hash = "sha256-ZKjfxTJCu3EUOKz16+VP8+cPqQliFNc7AU1FPC1gOXw=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
2023-08-22 20:05:09 +00:00
|
|
|
wheel
|
2023-05-24 13:37:59 +00:00
|
|
|
];
|
|
|
|
|
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
|
|
|
|
];
|
|
|
|
|
2023-08-10 07:59:29 +00:00
|
|
|
passthru.optional-dependencies = lib.fix (self: {
|
2022-06-26 10:26:21 +00:00
|
|
|
array = [
|
|
|
|
numpy
|
|
|
|
];
|
|
|
|
complete = [
|
2023-08-10 07:59:29 +00:00
|
|
|
pyarrow
|
|
|
|
lz4
|
|
|
|
]
|
|
|
|
++ self.array
|
|
|
|
++ self.dataframe
|
|
|
|
++ self.distributed
|
|
|
|
++ self.diagnostics;
|
2022-06-26 10:26:21 +00:00
|
|
|
dataframe = [
|
|
|
|
numpy
|
|
|
|
pandas
|
|
|
|
];
|
|
|
|
distributed = [
|
|
|
|
distributed
|
|
|
|
];
|
|
|
|
diagnostics = [
|
|
|
|
bokeh
|
|
|
|
jinja2
|
|
|
|
];
|
2023-08-10 07:59:29 +00:00
|
|
|
});
|
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
|
2023-08-10 07:59:29 +00:00
|
|
|
# from panda[test]
|
|
|
|
hypothesis
|
|
|
|
pytest-asyncio
|
2023-02-16 17:41:37 +00:00
|
|
|
] ++ lib.optionals (!arrow-cpp.meta.broken) [ # support is sparse on aarch64
|
|
|
|
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 \
|
2023-08-22 20:05:09 +00:00
|
|
|
--replace "import versioneer" "" \
|
2020-04-24 23:36:52 +00:00
|
|
|
--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 \
|
2023-08-22 20:05:09 +00:00
|
|
|
--replace ', "versioneer[toml]==0.28"' "" \
|
2022-06-26 10:26:21 +00:00
|
|
|
--replace " --durations=10" "" \
|
2023-05-24 13:37:59 +00:00
|
|
|
--replace " --cov-config=pyproject.toml" "" \
|
2023-08-10 07:59:29 +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
|
|
|
] ++ [
|
2023-08-10 07:59:29 +00:00
|
|
|
# AttributeError: 'ArrowStringArray' object has no attribute 'tobytes'. Did you mean: 'nbytes'?
|
|
|
|
"test_dot"
|
|
|
|
"test_dot_nan"
|
|
|
|
"test_merge_column_with_nulls"
|
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
|
|
|
};
|
|
|
|
}
|