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
, 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
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
2021-09-18 10:52:07 +00:00
, toolz
2022-06-26 10:26:21 +00:00
, zarr
2020-04-24 23:36:52 +00:00
} :
buildPythonPackage rec {
pname = " d a s k " ;
2022-11-04 12:27:35 +00:00
version = " 2 0 2 2 . 1 0 . 2 " ;
2021-09-18 10:52:07 +00:00
format = " s e t u p t o o l s " ;
2022-11-04 12:27:35 +00:00
disabled = pythonOlder " 3 . 8 " ;
2020-04-24 23:36:52 +00:00
src = fetchFromGitHub {
owner = " d a s k " ;
repo = pname ;
rev = version ;
2022-11-04 12:27:35 +00:00
hash = " s h a 2 5 6 - z H J R 2 W j H i g U M W t R J W 2 5 + g k 1 f K G K e d U 5 3 B B j w x 5 z a o d A = " ;
2020-04-24 23:36:52 +00:00
} ;
2022-11-04 12:27:35 +00:00
patches = [
( fetchpatch {
# Fix test_repartition_npartitions on platforms other than x86-64
url = " h t t p s : / / g i t h u b . c o m / d a s k / d a s k / c o m m i t / 6 5 f 4 0 a d 4 6 1 c 5 7 0 6 5 f 9 8 1 e 6 2 1 3 e 3 3 b 1 d 1 3 c c 9 b c 8 f . p a t c h " ;
hash = " s h a 2 5 6 - K y T S m s 4 i k 1 k Y t L + I / h u A x D + z K 2 A A u P k w m H A 9 F Y k 6 0 1 Y = " ;
} )
] ;
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
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
checkInputs = [
2022-06-26 10:26:21 +00:00
fastparquet
pyarrow
2021-03-09 03:18:52 +00:00
pytestCheckHook
pytest-rerunfailures
pytest-xdist
2022-06-26 10:26:21 +00:00
scipy
zarr
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 " d e f g e t _ v e r s i o n s ( ) : r e t u r n { ' d i r t y ' : F a l s e , ' e r r o r ' : N o n e , ' f u l l - r e v i s i o n i d ' : N o n e , ' v e r s i o n ' : ' ${ version } ' } " > dask/_version.py
substituteInPlace setup . py \
- - replace " v e r s i o n = v e r s i o n e e r . g e t _ v e r s i o n ( ) , " " v e r s i o n = ' ${ version } ' , " \
- - replace " c m d c l a s s = v e r s i o n e e r . g e t _ c m d c l a s s ( ) , " " "
2022-06-26 10:26:21 +00:00
substituteInPlace setup . cfg \
- - replace " - - d u r a t i o n s = 1 0 " " " \
- - 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
" - - r e r u n s 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 ' n o t n e t w o r k ' "
2022-09-30 11:47:45 +00:00
# DeprecationWarning: The 'sym_pos' keyword is deprecated and should be replaced by using 'assume_a = "pos"'. 'sym_pos' will be removed in SciPy 1.11.0.
" - W " " i g n o r e : : D e p r e c a t i o n W a r n i n g "
2021-05-03 20:48:10 +00:00
] ;
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
" t e s t _ a u t o _ b l o c k s i z e _ c s v "
2022-06-26 10:26:21 +00:00
# AttributeError: 'str' object has no attribute 'decode'
" t e s t _ r e a d _ d i r _ n o m e t a "
2021-06-28 23:13:55 +00:00
] ++ [
2022-06-26 10:26:21 +00:00
" t e s t _ c h u n k s i z e _ f i l e s "
2022-11-04 12:27:35 +00:00
# TypeError: 'ArrowStringArray' with dtype string does not support reduction 'min'
" t e s t _ s e t _ i n d e x _ s t r i n g "
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 = [
" d a s k "
" d a s k . a r r a y "
" d a s k . b a g "
" d a s k . b y t e s "
" d a s k . d a t a f r a m e "
" d a s k . d a t a f r a m e . i o "
" d a s k . d a t a f r a m e . t s e r i e s "
" d a s k . d i a g n o s t i c s "
] ;
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 = " M i n i m a l t a s k s c h e d u l i n g a b s t r a c t i o n " ;
2020-10-27 00:29:36 +00:00
homepage = " h t t p s : / / d a s k . o r g / " ;
changelog = " h t t p s : / / d o c s . d a s k . o r g / e n / l a t e s t / c h a n g e l o g . h t m l " ;
2021-03-09 03:18:52 +00:00
license = licenses . bsd3 ;
maintainers = with maintainers ; [ fridh ] ;
2020-04-24 23:36:52 +00:00
} ;
}