From 92da996e62eb25b45473b5dc32dbe4d60ceb8f76 Mon Sep 17 00:00:00 2001 From: Chris Ostrouchov Date: Tue, 31 Dec 2019 09:48:45 -0500 Subject: [PATCH] python3Packages.dask: 2.9.0 -> 2.9.1 enable tests, use github src --- .../python-modules/dask/default.nix | 41 ++++++++++++++----- 1 file changed, 30 insertions(+), 11 deletions(-) diff --git a/pkgs/development/python-modules/dask/default.nix b/pkgs/development/python-modules/dask/default.nix index 5a330294596..beef26ec5be 100644 --- a/pkgs/development/python-modules/dask/default.nix +++ b/pkgs/development/python-modules/dask/default.nix @@ -1,7 +1,7 @@ { lib , bokeh , buildPythonPackage -, fetchPypi +, fetchFromGitHub , fsspec , pytest , pythonOlder @@ -19,21 +19,40 @@ buildPythonPackage rec { disabled = pythonOlder "3.5"; - src = fetchPypi { - inherit pname version; - sha256 = "eec200032922b2249f7f1061f8701eaf3e68488cfa78ff2b47c3262f442bede7"; + src = fetchFromGitHub { + owner = "dask"; + repo = pname; + rev = version; + sha256 = "1xayr4gkp4slvmh2ksdr0d196giz3yhknqjjg1vw2j0la9gwfwxs"; }; - checkInputs = [ pytest ]; - propagatedBuildInputs = [ - bokeh cloudpickle dill fsspec numpy pandas partd toolz ]; + checkInputs = [ + pytest + ]; - checkPhase = '' - py.test dask + propagatedBuildInputs = [ + bokeh + cloudpickle + dill + fsspec + numpy + pandas + partd + toolz + ]; + + postPatch = '' + # versioneer hack to set version of github package + 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()," "" ''; - # URLError - doCheck = false; + checkPhase = '' + pytest + ''; meta = { description = "Minimal task scheduling abstraction";