1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pytest
5, mock
6, numpy
7, multipledispatch
8, dateutil
9}:
10
11let
12 # Fetcher function looks similar to fetchPypi.
13 # Allows for easier overriding, without having to know
14 # how the source is actually fetched.
15 fetcher = {pname, version, sha256}: fetchFromGitHub {
16 owner = "blaze";
17 repo = pname;
18 rev = version;
19 inherit sha256;
20 };
21
22in buildPythonPackage rec {
23 pname = "datashape";
24 version = "0.5.4";
25
26 src = fetcher {
27 inherit pname version;
28 sha256 = "0rhlj2kjj1vx5m73wnc5518rd6cs1zsbgpsvzk893n516k69shcf";
29 };
30
31 checkInputs = [ pytest mock ];
32 propagatedBuildInputs = [ numpy multipledispatch dateutil ];
33
34 # Disable several tests
35 # https://github.com/blaze/datashape/issues/232
36 checkPhase = ''
37 py.test -k "not test_validate and not test_nested_iteratables and not test_validate_dicts and not test_tuples_can_be_records_too" datashape/tests
38 '';
39
40 meta = {
41 homepage = https://github.com/ContinuumIO/datashape;
42 description = "A data description language";
43 license = lib.licenses.bsd2;
44 maintainers = with lib.maintainers; [ fridh ];
45 # Package is no longer maintained upstream, and more and more tests are failing.
46 broken = true;
47 };
48}