git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #44657 from costrouc/costrouc/dask-distributed

pythonPackages.distributed: 1.15.1 -> 1.22.1

commit8d4248a4cb95b20b236b80ce4cbce9b71ba8a80d authorRyan Mulligan <ryan@ryantm.com> dateTue 11 Sep 2018, 16:05 (8 years ago) parentc016e7f027b9be
7 files changed+189−38
pkgs/development/python-modules/distributed/default.nix+62 pkgs/development/python-modules/joblib/default.nix+13−8 pkgs/development/python-modules/pytest-faulthandler/default.nix+34 pkgs/development/python-modules/pytest-repeat/default.nix+29 pkgs/development/python-modules/pytest-timeout/default.nix+3−2 pkgs/development/python-modules/python-lz4/default.nix+40 pkgs/top-level/python-packages.nix+8−28
pkgs/development/python-modules/distributed/default.nixnew file+62
@@ -0,0 +1,62 @@
1+{ lib
2+, buildPythonPackage
3+, fetchFromGitHub
4+, pytest
5+, pytest-repeat
6+, pytest-faulthandler
7+, pytest-timeout
8+, mock
9+, joblib
10+, click
11+, cloudpickle
12+, dask
13+, msgpack
14+, psutil
15+, six
16+, sortedcontainers
17+, tblib
18+, toolz
19+, tornado
20+, zict
21+, pyyaml
22+, pythonOlder
23+, futures
24+, singledispatch
25+}:
26+
27+buildPythonPackage rec {
28+ pname = "distributed";
29+ version = "1.22.1";
30+
31+ # get full repository need conftest.py to run tests
32+ src = fetchFromGitHub {
33+ owner = "dask";
34+ repo = pname;
35+ rev = version;
36+ sha256 = "0xvx55rhbhlyys3kjndihwq6y6260qzy9mr3miclh5qddaiw2d5z";
37+ };
38+
39+ checkInputs = [ pytest pytest-repeat pytest-faulthandler pytest-timeout mock joblib ];
40+ propagatedBuildInputs = [
41+ click cloudpickle dask msgpack psutil six
42+ sortedcontainers tblib toolz tornado zict pyyaml
43+ ] ++ lib.optional (pythonOlder "3.2") [ futures ]
44+ ++ lib.optional (pythonOlder "3.4") [ singledispatch ];
45+
46+ # tests take about 10-15 minutes
47+ # ignore 5 cli tests out of 1000 total tests that fail due to subprocesses
48+ # these tests are not critical to the library (only the cli)
49+ checkPhase = ''
50+ py.test distributed -m "not avoid-travis" -r s --timeout-method=thread --timeout=0 --durations=20 --ignore="distributed/cli/tests"
51+ '';
52+
53+ # when tested random tests would fail and not repeatably
54+ doCheck = false;
55+
56+ meta = {
57+ description = "Distributed computation in Python.";
58+ homepage = http://distributed.readthedocs.io/en/latest/;
59+ license = lib.licenses.bsd3;
60+ maintainers = with lib.maintainers; [ teh costrouc ];
61+ };
62+}
pkgs/development/python-modules/joblib/default.nix+13−8
@@ -1,31 +1,36 @@
11{ lib
22, buildPythonPackage
3−, fetchPypi
3+, fetchFromGitHub
44, sphinx
55, numpydoc
66, pytest
7+, python-lz4
78}:
89
910
1011buildPythonPackage rec {
1112 pname = "joblib";
12− version = "0.12.3";
13− src = fetchPypi {
14− inherit pname version;
15− sha256 = "333b9bf16ff015d6b56bf80b9831afdd243443cb84c7ff7b6e342f117e354c42";
13+ version = "0.12.4";
14+
15+ # get full repository inorder to run tests
16+ src = fetchFromGitHub {
17+ owner = "joblib";
18+ repo = pname;
19+ rev = version;
20+ sha256 = "06zszgp7wpa4jr554wkk6kkigp4k9n5ad5h08i6w9qih963rlimb";
1621 };
1722
1823 checkInputs = [ sphinx numpydoc pytest ];
24+ propagatedBuildInputs = [ python-lz4 ];
1925
2026 checkPhase = ''
21− py.test -k 'not test_disk_used and \
22− not test_nested_parallel_warnings and \
23− not test_nested_parallelism_limit' joblib/test
27+ py.test joblib
2428 '';
2529
2630 meta = {
2731 description = "Lightweight pipelining: using Python functions as pipeline jobs";
2832 homepage = https://pythonhosted.org/joblib/;
2933 license = lib.licenses.bsd3;
34+ maintainers = with lib.maintainers; [ costrouc ];
3035 };
3136}
pkgs/development/python-modules/pytest-faulthandler/default.nixnew file+34
@@ -0,0 +1,34 @@
1+{ lib
2+, buildPythonPackage
3+, fetchPypi
4+, setuptools_scm
5+, pytest
6+, pytest-mock
7+, pythonOlder
8+, faulthandler
9+}:
10+
11+buildPythonPackage rec {
12+ pname = "pytest-faulthandler";
13+ version = "1.5.0";
14+
15+ src = fetchPypi {
16+ inherit pname version;
17+ sha256 = "bf8634c3fd6309ef786ec03b913a5366163fdb094ebcfdebc35626400d790e0d";
18+ };
19+
20+ buildInputs = [ setuptools_scm pytest ];
21+ checkInputs = [ pytest-mock ];
22+ propagatedBuildInputs = lib.optional (pythonOlder "3.0") faulthandler;
23+
24+ checkPhase = ''
25+ py.test
26+ '';
27+
28+ meta = {
29+ description = "Py.test plugin that activates the fault handler module for tests";
30+ homepage = https://github.com/pytest-dev/pytest-faulthandler;
31+ license = lib.licenses.mit;
32+ maintainers = with lib.maintainers; [ costrouc ];
33+ };
34+}
pkgs/development/python-modules/pytest-repeat/default.nixnew file+29
@@ -0,0 +1,29 @@
1+{ lib
2+, buildPythonPackage
3+, fetchPypi
4+, setuptools_scm
5+, pytest
6+}:
7+
8+buildPythonPackage rec {
9+ pname = "pytest-repeat";
10+ version = "0.6.0";
11+
12+ src = fetchPypi {
13+ inherit pname version;
14+ sha256 = "84aba2fcca5dc2f32ae626a01708f469f17b3384ec3d1f507698077f274909d6";
15+ };
16+
17+ buildInputs = [ setuptools_scm pytest ];
18+
19+ checkPhase = ''
20+ py.test
21+ '';
22+
23+ meta = {
24+ description = "Pytest plugin for repeating tests";
25+ homepage = https://github.com/pytest-dev/pytest-repeat;
26+ maintainers = with lib.maintainers; [ costrouc ];
27+ license = lib.licenses.mpl20;
28+ };
29+}
pkgs/development/python-modules/pytest-timeout/default.nix+3−2
@@ -1,5 +1,6 @@
11{ buildPythonPackage
22, fetchPypi
3+, fetchpatch
34, lib
45, pexpect
56, pytest
@@ -13,7 +14,7 @@ buildPythonPackage rec {
1314 inherit pname version;
1415 sha256 = "1117fc0536e1638862917efbdc0895e6b62fa61e6cf4f39bb655686af7af9627";
1516 };
16− buildInputs = [ pytest ];
17+
1718 checkInputs = [ pytest pexpect ];
1819 checkPhase = ''pytest -ra'';
1920
@@ -21,6 +22,6 @@ buildPythonPackage rec {
2122 description = "py.test plugin to abort hanging tests";
2223 homepage = https://bitbucket.org/pytest-dev/pytest-timeout/;
2324 license = licenses.mit;
24− maintainers = with maintainers; [ makefu ];
25+ maintainers = with maintainers; [ makefu costrouc ];
2526 };
2627}
pkgs/development/python-modules/python-lz4/default.nixnew file+40
@@ -0,0 +1,40 @@
1+{ lib
2+, buildPythonPackage
3+, fetchFromGitHub
4+, pytestrunner
5+, pytest
6+, psutil
7+, setuptools_scm
8+, pkgconfig
9+, isPy3k
10+, future
11+}:
12+
13+buildPythonPackage rec {
14+ pname = "python-lz4";
15+ version = "2.1.0";
16+
17+ # get full repository inorder to run tests
18+ src = fetchFromGitHub {
19+ owner = pname;
20+ repo = pname;
21+ rev = "v${version}";
22+ sha256 = "1vjfplj37jcw1mf8l810dv76dx0raia3ylgyfy7sfsb3g17brjq6";
23+ };
24+
25+ buildInputs = [ setuptools_scm pkgconfig pytestrunner ];
26+ checkInputs = [ pytest psutil ];
27+ propagatedBuildInputs = lib.optionals (!isPy3k) [ future ];
28+
29+ # give a hint to setuptools_scm on package version
30+ preBuild = ''
31+ export SETUPTOOLS_SCM_PRETEND_VERSION="v${version}"
32+ '';
33+
34+ meta = {
35+ description = "LZ4 Bindings for Python";
36+ homepage = https://github.com/python-lz4/python-lz4;
37+ license = lib.licenses.bsd0;
38+ maintainers = with lib.maintainers; [ costrouc ];
39+ };
40+}
pkgs/top-level/python-packages.nix+8−28
@@ -288,6 +288,8 @@ in {
288288
289289 distorm3 = callPackage ../development/python-modules/distorm3 { };
290290
291+ distributed = callPackage ../development/python-modules/distributed { };
292+
291293 docutils = callPackage ../development/python-modules/docutils { };
292294
293295 dogtail = callPackage ../development/python-modules/dogtail { };
@@ -501,6 +503,8 @@ in {
501503
502504 python-hosts = callPackage ../development/python-modules/python-hosts { };
503505
506+ python-lz4 = callPackage ../development/python-modules/python-lz4 { };
507+
504508 python-igraph = callPackage ../development/python-modules/python-igraph {
505509 pkgconfig = pkgs.pkgconfig;
506510 igraph = pkgs.igraph;
@@ -1879,6 +1883,8 @@ in {
18791883
18801884 pytest-django = callPackage ../development/python-modules/pytest-django { };
18811885
1886+ pytest-faulthandler = callPackage ../development/python-modules/pytest-faulthandler { };
1887+
18821888 pytest-fixture-config = callPackage ../development/python-modules/pytest-fixture-config { };
18831889
18841890 pytest-forked = callPackage ../development/python-modules/pytest-forked { };
@@ -1903,6 +1909,8 @@ in {
19031909
19041910 pytest-raisesregexp = callPackage ../development/python-modules/pytest-raisesregexp { };
19051911
1912+ pytest-repeat = callPackage ../development/python-modules/pytest-repeat { };
1913+
19061914 pytestrunner = callPackage ../development/python-modules/pytestrunner { };
19071915
19081916 pytestquickcheck = callPackage ../development/python-modules/pytest-quickcheck { };
@@ -1970,34 +1978,6 @@ in {
19701978
19711979 zict = callPackage ../development/python-modules/zict { };
19721980
1973− distributed = buildPythonPackage rec {
1974−
1975− name = "distributed-${version}";
1976− version = "1.15.1";
1977−
1978− src = pkgs.fetchurl {
1979− url = "mirror://pypi/d/distributed/${name}.tar.gz";
1980− sha256 = "037a07sdf2ch1d360nqwqz3b4ld8msydng7mw4i5s902v7xr05l6";
1981− };
1982−
1983− buildInputs = with self; [ pytest docutils ];
1984− propagatedBuildInputs = with self; [
1985− dask six boto3 s3fs tblib locket msgpack-python click cloudpickle tornado
1986− psutil botocore zict lz4 sortedcollections sortedcontainers
1987− ] ++ (if !isPy3k then [ singledispatch ] else []);
1988−
1989− # py.test not picking up local config file, even when running
1990− # manually: E ValueError: no option named '--runslow'
1991− doCheck = false;
1992−
1993− meta = {
1994− description = "Distributed computation in Python.";
1995− homepage = "http://distributed.readthedocs.io/en/latest/";
1996− license = licenses.bsd3;
1997− maintainers = with maintainers; [ teh ];
1998− };
1999− };
2000−
20011981 digital-ocean = callPackage ../development/python-modules/digitalocean { };
20021982
20031983 leather = callPackage ../development/python-modules/leather { };